#include <bits/stdc++.h>
using namespace std;
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define pb push_back
#define sqr(x) abs((x) * (x))
#define sume(a) (accumulate(all(a), 0ll))
#define mine(a) (*min_element(all(a)))
#define maxe(a) (*max_element(all(a)))
bool getbit (int mask, int bit) {return (mask & (1 << bit));}
bool is_sqrt (int a) {double x = sqrt(a); if (x == (int)x) return 1; return 0;}
typedef long long ll;
typedef long double ld;
typedef void hahahahahaha;
ll lcm (ll a, ll b) {return (a / __gcd(a, b) * b);}
typedef unsigned long long ull;
const unsigned long long MOD = 1e9 + 7;
const ull N = 2e5 + 5;
const ll dx[]={-1, 1, -1, 1};  
const ll dy[]={-1, 1, 1, -1};
ll binpow (ll a, ll n) { if (n == 0) return 1; if (n % 2 == 1) return binpow (a, n-1) % MOD * a % MOD;else {ll b = binpow (a, n / 2);return b % MOD * b % MOD;}}
//vector <ll> g[N];int used[N];ll d[N];int p[N];
//char c[N][N];
//void ptt (int x, int y) {g[x].pb(y);g[y].pb(x);}
ll ans = 0;
ll a, b; 
void f (ll x) {
	ans += x;
	if (x == 1) return;
	f (x / 2), f (x - (x / 2));
}
hahahahahaha hahahahahah () {
	cin >> a >> b;
	ll x = a * b;
	if (a == 1 && b == 1) {
		cout << 1;
		return;
	}
	f (x / 2), f (x - (x / 2));
	cout << ans + x;
}

int main() {
	//freopen("hps.in", "r", stdin); freopen("hps.out", "w", stdout);
	ios_base::sync_with_stdio(0); cout.tie(0); cin.tie(0); cout.setf(ios::fixed);cout.precision(10);
    int hahahahaha = 1; //cin >> hahahahaha;
    //int cnt = 1;
	while (hahahahaha --) {
		//cout << "Case " << cnt++ << ": ";
		hahahahahah();
		cout << '\n';
	}
	return 0;
}
	
