import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader;

public class Main {

public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String line = in.readLine();
    String[] s = line.split(" ");
    int w = Integer.parseInt(s[0]), h = Integer.parseInt(s[1]);
    int res = 0;
    int w_yu = w % 4, h_yu = h % 4;
    res = (w - w_yu) * (h - h_yu) / 2;
    //横向多余
    res += w_yu * (h - h_yu) / 2;
    //竖向多余
    res += h_yu * (w - w_yu) / 2;
//  System.out.println(w_yu + ", " + h_yu);
    //重叠多余
    if(w_yu == 1 || w_yu == 2) {
        if(h_yu == 1) {
            res += 1 * w_yu;
        }
        else if(h_yu >= 2) {
            res += 2 * w_yu;
        }
    }
    else if(w_yu == 3 || w_yu == 4) {
        if(h_yu <= 2) {
            res += 2 * h_yu;
        }
        else {
            res += (h_yu - 2) * (w_yu - 2) + 4;
        }
    }
    System.out.println(res);
}

}