#include<bits/stdc++.h>

using namespace std;

int main(){

    int j, d;
    cin>> j >> d;
    int o = (2 * j + 2 * d) - 4;
    int k = j*d;
    cout<< o + (k - o)/ 2 <<endl;

    if(j == 1 && d == 1){
        cout<<"1"<<endl;
    }


    return 0;
}