#include <bits/stdc++.h>

using namespace std;

int main()
{
    long long int n,m;
    cin >> n >> m;
    n = n-2;
    m = m-2;
    if(n*m %2==0)
    {
        cout << n*m/2;
    }
    else
    {
        cout << n*m/2+1;
    }
}