#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <iostream>
#include <time.h>
#include <fstream>
#include <string>
#include <vector>
#include <algorithm>
#include <string>
#include <sstream>
#include <iterator>
#include <windows.h>
#include <cmath>

#define INF 0x3f3f3f3f

using namespace std;
using std::cerr;
using std::cin;
using std::cout;
using std::endl;
using std::ifstream;
using std::istringstream;
using std::ostringstream;
using std::string;
using std::stringstream;
using std::vector;

int main()
{
    float n, m;
    int empty;

    cin >> n;
    cin >> m;

    empty = ceil((n - 2) * (m - 2) / 2);

    cout << n * m - empty;

    return 0;
}