#define _CRT_SECURE_NO_WARNINGS
#include<iostream>
#include<algorithm>
#include<cmath>
#include<vector>
#include<string>
#include<set>
#include<map>
#include<iomanip>
#include<bitset>
#include<unordered_set>
#include<unordered_map>
#include<queue>
#include<stack>
#include<deque>
using namespace std;
#define int long long
#define all(x) x.begin(), x.end()

bool check_up(int x, int y, vector<string>& a) {
	if (x == 0) {
		return false;
	}
	return a[x - 1][y] == '#';
}

bool check_down(int x, int y, vector<string>& a) {
	if (x == 9) {
		return false;
	}
	return a[x + 1][y] == '#';
}

bool check_left(int x, int y, vector<string>& a) {
	if (y == 0) {
		return false;
	}
	return a[x][y - 1] == '#';
}

bool check_right(int x, int y, vector<string>& a) {
	if (y == 9) {
		return false;
	}
	return a[x][y + 1] == '#';
}

void bfs(int x, int y, vector<string>& a, vector<vector<int>>& used, vector<int>& cnt) {
	queue<pair<int, int>> q;
	q.push({ x, y });
	int last_x, last_y;
	while (!q.empty()) {
		auto p = q.front();
		q.pop();
		used[p.first][p.second] = 1;
		vector<int> mv(4);
		bool f = false;
		if (check_down(p.first, p.second, a)) {
			q.push({ p.first + 1, p.second });
			f = true;
		}
		if (check_right(p.first, p.second, a)) {
			q.push({ p.first, p.second + 1 });
			if (f) {
				cout << "NO";
				exit(0);
			}
			f = true;
		}
		last_x = p.first;
		last_y = p.second;
	}
}

void solve1() {
	int n = 10;
	vector<string> a(n);
	for (string& s : a)
		cin >> s;
	vector<int> cnt(4, 0);
	vector<vector<int>> used(10, vector<int>(10, 0));
	for (int i = 0; i < n; ++i) {
		for (int j = 0; j < n; ++j) {
			if (used[i][j] == 0 && a[i][j] == '#') {
				bfs(i, j, a, used, cnt);
			}
		}
	}
}

int getans(int h, int w) {
	if (h == 0) return 0;
	else if (h == 1 && w == 1) return 1;
	if (h < w) swap(h, w);
	return h*w + getans(h / 2, w) + getans((h + 1) / 2, w);
}

void solve() {
	int h, w;
	cin >> h >> w;
	cout << getans(h, w) << '\n';
}

signed main() {
	ios_base::sync_with_stdio(false);
	cin.tie(nullptr);
	cout.tie(nullptr);
#ifdef _DEBUG
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif
	int t = 1;
	// cin >> t;
	while (t--) {
		solve();
	}
}