#include <bits/stdc++.h>
using namespace std;
int main()
{
    long long n, m;
    cin >> n >> m;
    int matr[n][m];
    for (int i = 0; i < n; i++)
    {
        for (int j = 0; j < m; j++)
        {
            matr[i][j] = 0;
        }
    }
    for (int i = 1; i < n - 1; i++) {
        for (int j = 1; j < m - 1; j++) {
            if(matr[i+1][j] == 0 && matr[i][j+1] == 0 && matr[i-1][j] == 0 && matr[i][j-1] == 0)
                matr[i][j] = 1;
        }
    }
    long k = 0;
    for (int i = 0; i < n; i++) {
        for (int j = 0; j < m; j++) {
            if(matr[i][j] == 0)
                k++;
        }
    }
    cout << k;
}