#include <bits/stdc++.h>
using namespace std;
int n, m,
    res[50][50] = {{0,  1,  2,  2,  3,  4,  4,  5,  6,  6,  7,  8,  8,  9,
                    10, 10, 11, 12, 12, 13, 14, 14, 15, 16, 16, 17, 18, 18,
                    19, 20, 20, 21, 22, 22, 23, 24, 24, 25, 26, 26},
                   {1,  2,  4,  5,  7,  8,  10, 11, 13, 14,
                    16, 17, 19, 20, 22, 23, 25, 26, 28, 29},
                   {2, 4, 6, 8, 11, 13, 15, 17, 20, 22, 24, 26, 29},
                   {2, 5, 8, 12, 14, 17, 21, 24, 26, 30},
                   {3, 7, 11, 14, 18, 22, 26, 29},
                   {4, 8, 13, 17, 22, 26},
                   {4, 10, 15, 21, 26},
                   {5, 11, 17, 24, 29},
                   {6, 13, 20, 26},
                   {6, 14, 22, 30},
                   {7, 16, 24},
                   {8, 17, 26},
                   {8, 19, 29},
                   {9, 20},
                   {10, 22},
                   {10, 23},
                   {11, 25},
                   {12, 26},
                   {12, 28},
                   {13, 29},
                   {14},
                   {14},
                   {15},
                   {16},
                   {16},
                   {17},
                   {18},
                   {18},
                   {19},
                   {20},
                   {20},
                   {21},
                   {22},
                   {22},
                   {23},
                   {24},
                   {24},
                   {25},
                   {26},
                   {26}};
int main() {
  return scanf("%d%d", &n, &m) and printf("%d\n", res[n - 1][m - 1]) and 0;
}
