
#include <iostream>
#include <vector>
#include <set>
#include <iomanip>
#include <stack>
#include <cmath>
#include <map>
#include <tuple>
#include <numeric>
#include <queue>
#include <algorithm>
#include <bitset>
#include<iterator>
#include <fstream>
#include <random>
#include <unordered_map>
#include <ctime>
#include <sstream>

using namespace std;

#define INF 1e17
#define MOD %=((ll)1000000007);
#define ll long long
#define si short int
#define ull unsigned long long
#define str string
#define vc vector //by jgjgjjg :)
#define db double 
#define fco {ios_base::sync_with_stdio(0);std::cout.tie(0); std::cin.tie(0); }
#define scan(t) {for (ll i = 0; i<(t.size()); i++) std::cin >> t[i];}
#define cf {fflush(stdout);}
#define SUM(a,sum) ll sum = 0; for (auto _p:a) sum += _p;
#define MAX(a, mx, pos) ll mx = -(1e18+1); ll pos = 0;FOR(i,a.size()) if (a[i] > mx) {pos = i;mx=a[i];};
#define FL(f) bool f = false;
#define NOO cout << -1 << endl;return 0;
#define its(a) a.begin(),a.end()
#define itsr(a) a.rbegin(),a.rend()
#define pb push_back
#define mset multiset
#define pos2 pair<ll,ll>
#define sz(a) (int)a.size()
#define fi first
#define se second
#define mnmx(a,b) {ll __c = a; a = min(a,b), b = max(b,__c);}
#define np nullptr
#define tpl tuple<ll, ll,ll>
#define M 1000000007
vc<vc<char>> mat;
map<pair<ll, ll>, ll> has;


ll rec(ll n, ll m) {
	if (n<m) swap(n, m);
	if (n * m == 1) return 1;
	ll ans = n * m;
	ans += rec(n / 2, m);
	ans += rec(n - n / 2, m);
	return ans;
}

void solve() {
	ll w, h; cin >> w >> h; cout << rec(w, h);
}

int main() {
	fco;
	//ll _t; cin >> _t;
	//while (_t--)
	solve();
}