#include <bits/stdc++.h>   using namespace std;   const long long int MOD = (pow(10, 9) + 7);   void vec_p(vector<long long int> &a) {     for (long long int i = 0; i < a.size(); i++) {       cout << a[i] <<    ;     }     cout <<   n ;   }   long long int vec_sum(vector<long long int> a) {     long long int s = 0;     for (long long int i = 0; i < a.size(); i++) {       s += a[i];     }     return s;   }   void pfx(vector<long long int> &a, vector<long long int> &prefix_sum) {     prefix_sum[0] = a[0];     for (long long int i = 1; i < a.size(); i++) {       prefix_sum[i] += (prefix_sum[i - 1] + a[i]);     }   }   void sorting_p(vector<pair<long long int, long long int> > &a) {     sort(a.begin(), a.end());   }   void sorting(vector<long long int> &a) {     sort(a.begin(), a.end(), greater<long long int>());   }   void vec_in(vector<long long int> &a, long long int n) {     for (long long int i = 0; i < n; i++) {       long long int x;       cin >> x;       a.push_back(x);     }   }   void Graph_in(vector<vector<long long int> > &G, long long int n) {     long long int x, y;     for (long long int i = 0; i < n; i++) {       cin >> x >> y;       G[x].push_back(y);       G[y].push_back(x);     }   }   void lps_table(string &s, vector<long long int> &lps) {     long long int n = s.size();     long long int len = 0;     for (long long int i = 1; i < n; i++) {       while (s[i] != s[len] && len > 0) {         len = lps[len - 1];         if (len == 0 && s[len] != s[i]) {           lps[i] = 0;           len = 0;           break;         }       }       if (s[len] == s[i]) {         lps[i] = len + 1;         len++;       }       if (len == 0 && s[len] != s[i]) {         lps[i] = 0;         len = 0;       }     }   }   void traversal(long long int &x, long long int &y,                  vector<vector<long long int> > &a, long long int r,                  long long int c) {     if (x + 2 < r) {       if (y + 1 < c) {         if (a[x + 2][y + 1] == -1) {           long long int i = x + 2;           long long int j = y + 1;           a[i][j] = a[x][y] ^ 1;           traversal(i, j, a, r, c);         }       }       if (y - 1 < c && y - 1 >= 0) {         if (a[x + 2][y - 1] == -1) {           long long int i = x + 2;           long long int j = y - 1;           a[i][j] = a[x][y] ^ 1;           traversal(i, j, a, r, c);         }       }     }     if (x + 1 < r) {       if (y + 2 < c) {         if (a[x + 1][y + 2] == -1) {           long long int i = x + 1;           long long int j = y + 2;           a[i][j] = a[x][y] ^ 1;           traversal(i, j, a, r, c);         }       }       if (y - 2 < c && y - 2 >= 0) {         if (a[x + 1][y - 2] == -1) {           long long int i = x + 1;           long long int j = y - 2;           a[i][j] = a[x][y] ^ 1;           traversal(i, j, a, r, c);         }       }     }     if (x - 2 < r && x - 2 >= 0) {       if (y + 1 < c) {         if (a[x - 2][y + 1] == -1) {           long long int i = x - 2;           long long int j = y + 1;           a[i][j] = a[x][y] ^ 1;           traversal(i, j, a, r, c);         }       }       if (y - 1 < c && y - 1 >= 0) {         if (a[x - 2][y - 1] == -1) {           long long int i = x - 2;           long long int j = y - 1;           a[i][j] = a[x][y] ^ 1;           traversal(i, j, a, r, c);         }       }     }     if (x - 1 < r && x - 1 >= 0) {       if (y + 2 < c) {         if (a[x - 1][y + 2] == -1) {           long long int i = x - 1;           long long int j = y + 2;           a[i][j] = a[x][y] ^ 1;           traversal(i, j, a, r, c);         }       }       if (y - 2 < c && y - 2 >= 0) {         if (a[x - 1][y - 2] == -1) {           long long int i = x - 1;           long long int j = y - 2;           a[i][j] = a[x][y] ^ 1;           traversal(i, j, a, r, c);         }       }     }   }   int main() {     ios_base::sync_with_stdio(false);     cin.tie(NULL);     cout.tie(NULL);     long long int r, c;     cin >> r >> c;     if (r < c) {       swap(r, c);     }     vector<vector<long long int> > a(r, vector<long long int>(c, -1));     for (long long int i = 0; i < r; i++) {       for (long long int j = 0; j < c; j++) {         if (a[i][j] == -1) {           a[i][j] = 1;           traversal(i, j, a, r, c);         }       }     }     long long int one = 0;     for (long long int i = 0; i < r; i++) {       for (long long int j = 0; j < c; j++) {         if (a[i][j] == 1) {           one++;         }       }     }     cout << one <<   n ;   }