#include <stdio.h>

int main(void) {
  int rows, cols;

  scanf("%d%d", &rows, &cols);


  int matrix[rows][cols];
  for (int i = 0; i < rows; i++) {
    for (int j = 0; j < cols; j++) {
      matrix[i][j] = 0;
    }
  }


  for (int i = 0; i < rows; i++) {
    matrix[i][0] = 2;
    matrix[i][cols-1] = 2;
  }
  for (int j = 0; j < cols; j++) {
    matrix[0][j] = 2;
    matrix[rows-1][j] = 2;
  }


  for (int i = 1; i < rows-1; i++) {
    for (int j = 1; j < cols-1; j++) {
      if (matrix[i-1][j] == 1 || matrix[i+1][j] == 1 || matrix[i][j-1] == 1 || matrix[i][j+1] == 1) {
        matrix[i][j] = 2;
      } else {
        matrix[i][j] = 1;
      }
    }
  }

  int count = 0;
  for (int i = 0; i < rows; i++) {
    for (int j = 0; j < cols; j++) {
      if (matrix[i][j] == 2) {
        count++;
      }
    }
  }

  printf("%d", count);

  return 0;
}