import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		int even = sc.nextInt();
		int odd = sc.nextInt();

		sc.close();

		List<Integer> numberList = new ArrayList<Integer>();

		int evenNumber = 2;
		for (int i = 1; i <= even; i++) {
			numberList.add(evenNumber);
			evenNumber += 2;
		}

		int oddNumber = 1;
		for (int i = 1; i <= odd; i++) {
			numberList.add(oddNumber);
			oddNumber += 2;
		}

		int result = 0;
		for (int i = 0; i < numberList.size(); i++) {
			for (int j = i; j < numberList.size(); j++) {
				int parent = numberList.get(i).intValue();
				int child = numberList.get(j).intValue();

				if (parent == child) {
					continue;
				}
				if ((parent + child) % 2 == 0) {
					result++;
				}
			}
		}

		System.out.print(result);
	}
} import java.util.ArrayList; ArrayList java.util import java.util.List; List java.util import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		int even = sc.nextInt();
		int odd = sc.nextInt();

		sc.close();

		List<Integer> numberList = new ArrayList<Integer>();

		int evenNumber = 2;
		for (int i = 1; i <= even; i++) {
			numberList.add(evenNumber);
			evenNumber += 2;
		}

		int oddNumber = 1;
		for (int i = 1; i <= odd; i++) {
			numberList.add(oddNumber);
			oddNumber += 2;
		}

		int result = 0;
		for (int i = 0; i < numberList.size(); i++) {
			for (int j = i; j < numberList.size(); j++) {
				int parent = numberList.get(i).intValue();
				int child = numberList.get(j).intValue();

				if (parent == child) {
					continue;
				}
				if ((parent + child) % 2 == 0) {
					result++;
				}
			}
		}

		System.out.print(result);
	}
} Main public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		int even = sc.nextInt();
		int odd = sc.nextInt();

		sc.close();

		List<Integer> numberList = new ArrayList<Integer>();

		int evenNumber = 2;
		for (int i = 1; i <= even; i++) {
			numberList.add(evenNumber);
			evenNumber += 2;
		}

		int oddNumber = 1;
		for (int i = 1; i <= odd; i++) {
			numberList.add(oddNumber);
			oddNumber += 2;
		}

		int result = 0;
		for (int i = 0; i < numberList.size(); i++) {
			for (int j = i; j < numberList.size(); j++) {
				int parent = numberList.get(i).intValue();
				int child = numberList.get(j).intValue();

				if (parent == child) {
					continue;
				}
				if ((parent + child) % 2 == 0) {
					result++;
				}
			}
		}

		System.out.print(result);
	} main {

		Scanner sc = new Scanner(System.in);

		int even = sc.nextInt();
		int odd = sc.nextInt();

		sc.close();

		List<Integer> numberList = new ArrayList<Integer>();

		int evenNumber = 2;
		for (int i = 1; i <= even; i++) {
			numberList.add(evenNumber);
			evenNumber += 2;
		}

		int oddNumber = 1;
		for (int i = 1; i <= odd; i++) {
			numberList.add(oddNumber);
			oddNumber += 2;
		}

		int result = 0;
		for (int i = 0; i < numberList.size(); i++) {
			for (int j = i; j < numberList.size(); j++) {
				int parent = numberList.get(i).intValue();
				int child = numberList.get(j).intValue();

				if (parent == child) {
					continue;
				}
				if ((parent + child) % 2 == 0) {
					result++;
				}
			}
		}

		System.out.print(result);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int even = sc.nextInt(); even sc.nextInt() sc.nextInt sc int odd = sc.nextInt(); odd sc.nextInt() sc.nextInt sc sc.close() sc.close sc List<Integer> numberList = new ArrayList<Integer>(); numberList new ArrayList<Integer>() int evenNumber = 2; evenNumber 2 for (int i = 1; i <= even; i++) {
			numberList.add(evenNumber);
			evenNumber += 2;
		} int i = 1; int i = 1; i 1 i <= even i even i++ i++ i {
			numberList.add(evenNumber);
			evenNumber += 2;
		} {
			numberList.add(evenNumber);
			evenNumber += 2;
		} numberList.add(evenNumber) numberList.add numberList evenNumber evenNumber += 2 evenNumber 2 int oddNumber = 1; oddNumber 1 for (int i = 1; i <= odd; i++) {
			numberList.add(oddNumber);
			oddNumber += 2;
		} int i = 1; int i = 1; i 1 i <= odd i odd i++ i++ i {
			numberList.add(oddNumber);
			oddNumber += 2;
		} {
			numberList.add(oddNumber);
			oddNumber += 2;
		} numberList.add(oddNumber) numberList.add numberList oddNumber oddNumber += 2 oddNumber 2 int result = 0; result 0 for (int i = 0; i < numberList.size(); i++) {
			for (int j = i; j < numberList.size(); j++) {
				int parent = numberList.get(i).intValue();
				int child = numberList.get(j).intValue();

				if (parent == child) {
					continue;
				}
				if ((parent + child) % 2 == 0) {
					result++;
				}
			}
		} int i = 0; int i = 0; i 0 i < numberList.size() i numberList.size() numberList.size numberList i++ i++ i {
			for (int j = i; j < numberList.size(); j++) {
				int parent = numberList.get(i).intValue();
				int child = numberList.get(j).intValue();

				if (parent == child) {
					continue;
				}
				if ((parent + child) % 2 == 0) {
					result++;
				}
			}
		} {
			for (int j = i; j < numberList.size(); j++) {
				int parent = numberList.get(i).intValue();
				int child = numberList.get(j).intValue();

				if (parent == child) {
					continue;
				}
				if ((parent + child) % 2 == 0) {
					result++;
				}
			}
		} for (int j = i; j < numberList.size(); j++) {
				int parent = numberList.get(i).intValue();
				int child = numberList.get(j).intValue();

				if (parent == child) {
					continue;
				}
				if ((parent + child) % 2 == 0) {
					result++;
				}
			} int j = i; int j = i; j i j < numberList.size() j numberList.size() numberList.size numberList j++ j++ j {
				int parent = numberList.get(i).intValue();
				int child = numberList.get(j).intValue();

				if (parent == child) {
					continue;
				}
				if ((parent + child) % 2 == 0) {
					result++;
				}
			} {
				int parent = numberList.get(i).intValue();
				int child = numberList.get(j).intValue();

				if (parent == child) {
					continue;
				}
				if ((parent + child) % 2 == 0) {
					result++;
				}
			} int parent = numberList.get(i).intValue(); parent numberList.get(i).intValue() numberList.get(i).intValue numberList.get(i) numberList.get numberList i int child = numberList.get(j).intValue(); child numberList.get(j).intValue() numberList.get(j).intValue numberList.get(j) numberList.get numberList j if (parent == child) {
					continue;
				} parent == child parent child {
					continue;
				} continue; if ((parent + child) % 2 == 0) {
					result++;
				} (parent + child) % 2 == 0 (parent + child) % 2 (parent + child) parent child 2 0 {
					result++;
				} result++ result System.out.print(result) System.out.print System.out System System.out result String[] args args public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		int even = sc.nextInt();
		int odd = sc.nextInt();

		sc.close();

		List<Integer> numberList = new ArrayList<Integer>();

		int evenNumber = 2;
		for (int i = 1; i <= even; i++) {
			numberList.add(evenNumber);
			evenNumber += 2;
		}

		int oddNumber = 1;
		for (int i = 1; i <= odd; i++) {
			numberList.add(oddNumber);
			oddNumber += 2;
		}

		int result = 0;
		for (int i = 0; i < numberList.size(); i++) {
			for (int j = i; j < numberList.size(); j++) {
				int parent = numberList.get(i).intValue();
				int child = numberList.get(j).intValue();

				if (parent == child) {
					continue;
				}
				if ((parent + child) % 2 == 0) {
					result++;
				}
			}
		}

		System.out.print(result);
	}
} public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		int even = sc.nextInt();
		int odd = sc.nextInt();

		sc.close();

		List<Integer> numberList = new ArrayList<Integer>();

		int evenNumber = 2;
		for (int i = 1; i <= even; i++) {
			numberList.add(evenNumber);
			evenNumber += 2;
		}

		int oddNumber = 1;
		for (int i = 1; i <= odd; i++) {
			numberList.add(oddNumber);
			oddNumber += 2;
		}

		int result = 0;
		for (int i = 0; i < numberList.size(); i++) {
			for (int j = i; j < numberList.size(); j++) {
				int parent = numberList.get(i).intValue();
				int child = numberList.get(j).intValue();

				if (parent == child) {
					continue;
				}
				if ((parent + child) % 2 == 0) {
					result++;
				}
			}
		}

		System.out.print(result);
	}
} Main
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		int even = sc.nextInt();
		int odd = sc.nextInt();

		sc.close();

		List<Integer> numberList = new ArrayList<Integer>();

		int evenNumber = 2;
		for (int i = 1; i <= even; i++) {
			numberList.add(evenNumber);
			evenNumber += 2;
		}

		int oddNumber = 1;
		for (int i = 1; i <= odd; i++) {
			numberList.add(oddNumber);
			oddNumber += 2;
		}

		int result = 0;
		for (int i = 0; i < numberList.size(); i++) {
			for (int j = i; j < numberList.size(); j++) {
				int parent = numberList.get(i).intValue();
				int child = numberList.get(j).intValue();

				if (parent == child) {
					continue;
				}
				if ((parent + child) % 2 == 0) {
					result++;
				}
			}
		}

		System.out.print(result);
	}
}
