import java.io.*; import java.util.*; import java.util.stream.LongStream; public class _p1509_Validate { public static void main(String[] args) throws IOException { new _p1509_Validate().solve(); } static int mod = (int)1e9+7; void solve() throws IOException { try (final InputValidator in = new InputValidator(System.in)) { int w = in.nextInt(0, 100000); in.space(); int h = in.nextInt(0, 100000); in.newLine(); in.eof(); System.out.println(solve(w, h)); } } int solve(int w, int h) { int ans = 0; if (w % 2 == 0 && h % 2 == 0) { if (w > h) { final int tmp = w; w = h; h = tmp; } while (w >= 1) { ans += h * 2 + 1; w -= 2; { final int tmp = w; w = h; h = tmp; } } if (w + h > 0) ans++; } else if (w % 2 == 1 && h % 2 == 1) { if (w < h) { final int tmp = w; w = h; h = tmp; } ans = 1; while (h >= 1) { ans += 2 * w; h -= 2; } } else { if (w % 2 == 1) { final int tmp = w; w = h; h = tmp; } ans = 1; while (h >= 1) { ans += 2 * w; h -= 2; } } return ans; } long func(long w, long h) { if (Math.max(w, h) == 1) return 0; if (w % 2 == 0 && h % 2 == 0) { long[] xs = new long[]{2*(h-1)+1,2*(w-4)+1,2*(h-2)+1,2*(w-6)+1,}; return func(xs, 2, 0); } if (w % 2 == 0 && h % 2 == 1) { long[] xs = new long[]{2*(h-1)+1,2*(w-4)+1,2*(h-3)+1,2*(w-4)+1,}; return func(xs, 0, 1); } if (w % 2 == 1 && h % 2 == 1) { long[] xs = new long[]{2*(h-1)+1,2*(w-3)+1,2*(h-3)+1,2*(w-5)+1,}; return func(xs, 0, 1); } return 0; } long func(long[] xs, long x, long o) { long t = LongStream.of(xs).map(a->(a+7-o)/8).min().getAsLong()+1; t = Math.max(t, 1); long ans = 0; for (int i = 0; i < 4; i++) { ans += sum(Math.max(0, xs[i]), t); // dump(i, xs, t, x, o, ans); if (t > 0 && xs[i] <= 8*(t-1)+o) t--; } ans += x * t; // dump(xs, t, x, o, ans); return ans; } long sum(long v, long t) { return v * t - 8 * t * (t - 1) / 2; } // for debug static void dump(Object... o) { System.err.println(Arrays.deepToString(o)); } static class InputValidator implements Closeable { final InputStream in; final int NO_BUFFER = -2; int buffer; public InputValidator(final InputStream in) { this.in = in; buffer = NO_BUFFER; } public char nextChar() throws IOException { int res = read(); check("#.".indexOf((char)res) >= 0 || Character.isLetterOrDigit(res)); return (char)res; } int read() throws IOException { final int res = buffer == NO_BUFFER ? in.read() : buffer; buffer = NO_BUFFER; return res; } void unread(int ch) throws IOException { buffer = ch; } // [low, high] long nextLong(long low, long high) throws IOException { long val = 0; int ch = -1; boolean read = false; while (true) { ch = read(); if (!Character.isDigit(ch)) break; read = true; val = val * 10 + ch - '0'; check(val <= high); } check(read); check(ch >= 0); check(val >= low); unread(ch); return val; } int nextInt(int low, int high) throws IOException { return (int)nextLong(low, high); } int[] nextInts(int n, int low, int high) throws IOException { int[] res = new int[n]; for (int i = 0; i < n; i++) { res[i] = nextInt(low, high); if (i + 1 != n) space(); } newLineOrEOF(); return res; } void space() throws IOException { int ch = read(); check(ch == ' '); } void newLine() throws IOException { int ch = read(); if (ch == '\r') ch = read(); check(ch == '\n'); } void newLineOrEOF() throws IOException { int ch = read(); check(ch == '\r' || ch == '\n' || ch < 0); } void eof() throws IOException { int ch = read(); check(ch < 0); } void check(boolean b) { if (!b) throw new RuntimeException(); } @Override public void close() throws IOException { } } }