func_code_string: #include <bits/stdc++.h>   using namespace std;   vector<string> split(const string& s, const string& delim =    ) {     vector<string> res;     string t;     for (int i = 0; i != s.size(); i++) {       if (delim.find(s[i]) != string::npos) {         if (!t.empty()) {           res.push_back(t);           t =   ;         }       } else {         t += s[i];       }     }     if (!t.empty()) {       res.push_back(t);     }     return res;   }   vector<int> splitInt(const string& s, const string& delim =    ) {     vector<string> tok = split(s, delim);     vector<int> res;     for (int i = 0; i != tok.size(); i++) res.push_back(atoi(tok[i].c_str()));     return res;   }   template <typename T>   void print(T a) {     cerr << a;   }   static void print(long long a) { cerr << a <<  L ; }   static void print(string a) { cerr <<     << a <<    ; }   template <typename T>   void print(vector<T> a) {     cerr <<  { ;     for (int i = 0; i != a.size(); i++) {       if (i != 0) cerr <<  ,  ;       print(a[i]);     }     cerr <<  }  << endl;   }   int main() {     int n, m;     while (cin >> n >> m) {       int res = 0;       if (n <= 1 || m <= 1) res = m * n;       if (n == 2 || m == 2) {         int x = max(m, n);         res = max(res, x / 4 * 4 + min((x % 4) * 2, 4));       }       int x = m * n / 2;       int y = m * n - x;       res = max(max(res, x), y);       res = min(res, m * n);       cout << res << endl;     }     return 0;   }   