import java.io.FileNotFoundException; import java.util.Arrays; import java.util.Scanner; public class Main { public static void main(String[] args) throws FileNotFoundException { new Main().run(); } final long MODULO = 1_000_000_000 + 7; void run() { Scanner sc = new Scanner(System.in); int w = sc.nextInt(); int h = sc.nextInt(); int m = Math.min(w, h); int M = Math.max(w, h); System.out.println(f(m, M)); } long f(int m, int M) { if (m > M) { int d = M; M = m; m = d; } if (m == 0 && M == 0) { return 0; } if (m == 0 && M > 0) { return 1; } if (m == 1) { return 2 * M + 1; } return 2 * (m + M - 1) + f(m - 2, M - 2); } void tr(Object... objects) { System.out.println(Arrays.deepToString(objects)); } }