import java.util.Scanner;

public class Main {

	public static final MyScanner in = new MyScanner();

	public static void main(String[] args) {

		int N = in.nextInt();
		int M = in.nextInt();
		int[] ALL = new int[N+M];
		for(int i=0;i<N;i++) {
			ALL[i] = 2;
		}
		for(int i=N;i<N+M;i++) {
			ALL[i] = 1;
		}

		int answer = 0;
		for(int i=0;i<N+M-1;i++) {
			for(int j=i+1;j<N+M;j++) {
				if ((ALL[i] + ALL[j]) % 2 == 0) answer++;
			}
		}


		System.out.println(answer);
	}


	public static class MyScanner {
		Scanner sc = new Scanner(System.in);
		String next() { return sc.next();}
		int nextInt() { return Integer.valueOf(sc.next());}
		long nextLong() { return Long.valueOf(sc.next()); }
	}
} import java.util.Scanner; Scanner java.util public class Main {

	public static final MyScanner in = new MyScanner();

	public static void main(String[] args) {

		int N = in.nextInt();
		int M = in.nextInt();
		int[] ALL = new int[N+M];
		for(int i=0;i<N;i++) {
			ALL[i] = 2;
		}
		for(int i=N;i<N+M;i++) {
			ALL[i] = 1;
		}

		int answer = 0;
		for(int i=0;i<N+M-1;i++) {
			for(int j=i+1;j<N+M;j++) {
				if ((ALL[i] + ALL[j]) % 2 == 0) answer++;
			}
		}


		System.out.println(answer);
	}


	public static class MyScanner {
		Scanner sc = new Scanner(System.in);
		String next() { return sc.next();}
		int nextInt() { return Integer.valueOf(sc.next());}
		long nextLong() { return Long.valueOf(sc.next()); }
	}
} Main public static final MyScanner in = new MyScanner(); in new MyScanner() public static void main(String[] args) {

		int N = in.nextInt();
		int M = in.nextInt();
		int[] ALL = new int[N+M];
		for(int i=0;i<N;i++) {
			ALL[i] = 2;
		}
		for(int i=N;i<N+M;i++) {
			ALL[i] = 1;
		}

		int answer = 0;
		for(int i=0;i<N+M-1;i++) {
			for(int j=i+1;j<N+M;j++) {
				if ((ALL[i] + ALL[j]) % 2 == 0) answer++;
			}
		}


		System.out.println(answer);
	} main {

		int N = in.nextInt();
		int M = in.nextInt();
		int[] ALL = new int[N+M];
		for(int i=0;i<N;i++) {
			ALL[i] = 2;
		}
		for(int i=N;i<N+M;i++) {
			ALL[i] = 1;
		}

		int answer = 0;
		for(int i=0;i<N+M-1;i++) {
			for(int j=i+1;j<N+M;j++) {
				if ((ALL[i] + ALL[j]) % 2 == 0) answer++;
			}
		}


		System.out.println(answer);
	} int N = in.nextInt(); N in.nextInt() in.nextInt in int M = in.nextInt(); M in.nextInt() in.nextInt in int[] ALL = new int[N+M]; ALL new int[N+M] N+M N M for(int i=0;i<N;i++) {
			ALL[i] = 2;
		} int i=0; int i=0; i 0 i<N i N i++ i++ i {
			ALL[i] = 2;
		} {
			ALL[i] = 2;
		} ALL[i] = 2 ALL[i] ALL i 2 for(int i=N;i<N+M;i++) {
			ALL[i] = 1;
		} int i=N; int i=N; i N i<N+M i N+M N M i++ i++ i {
			ALL[i] = 1;
		} {
			ALL[i] = 1;
		} ALL[i] = 1 ALL[i] ALL i 1 int answer = 0; answer 0 for(int i=0;i<N+M-1;i++) {
			for(int j=i+1;j<N+M;j++) {
				if ((ALL[i] + ALL[j]) % 2 == 0) answer++;
			}
		} int i=0; int i=0; i 0 i<N+M-1 i N+M-1 N+M N M 1 i++ i++ i {
			for(int j=i+1;j<N+M;j++) {
				if ((ALL[i] + ALL[j]) % 2 == 0) answer++;
			}
		} {
			for(int j=i+1;j<N+M;j++) {
				if ((ALL[i] + ALL[j]) % 2 == 0) answer++;
			}
		} for(int j=i+1;j<N+M;j++) {
				if ((ALL[i] + ALL[j]) % 2 == 0) answer++;
			} int j=i+1; int j=i+1; j i+1 i 1 j<N+M j N+M N M j++ j++ j {
				if ((ALL[i] + ALL[j]) % 2 == 0) answer++;
			} {
				if ((ALL[i] + ALL[j]) % 2 == 0) answer++;
			} if ((ALL[i] + ALL[j]) % 2 == 0) answer++; (ALL[i] + ALL[j]) % 2 == 0 (ALL[i] + ALL[j]) % 2 (ALL[i] + ALL[j]) ALL[i] ALL i ALL[j] ALL j 2 0 answer++ answer System.out.println(answer) System.out.println System.out System System.out answer String[] args args public static class MyScanner {
		Scanner sc = new Scanner(System.in);
		String next() { return sc.next();}
		int nextInt() { return Integer.valueOf(sc.next());}
		long nextLong() { return Long.valueOf(sc.next()); }
	} MyScanner Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String next() { return sc.next();} next { return sc.next();} return sc.next(); sc.next() sc.next sc int nextInt() { return Integer.valueOf(sc.next());} nextInt { return Integer.valueOf(sc.next());} return Integer.valueOf(sc.next()); Integer.valueOf(sc.next()) Integer.valueOf Integer sc.next() sc.next sc long nextLong() { return Long.valueOf(sc.next()); } nextLong { return Long.valueOf(sc.next()); } return Long.valueOf(sc.next()); Long.valueOf(sc.next()) Long.valueOf Long sc.next() sc.next sc public class Main {

	public static final MyScanner in = new MyScanner();

	public static void main(String[] args) {

		int N = in.nextInt();
		int M = in.nextInt();
		int[] ALL = new int[N+M];
		for(int i=0;i<N;i++) {
			ALL[i] = 2;
		}
		for(int i=N;i<N+M;i++) {
			ALL[i] = 1;
		}

		int answer = 0;
		for(int i=0;i<N+M-1;i++) {
			for(int j=i+1;j<N+M;j++) {
				if ((ALL[i] + ALL[j]) % 2 == 0) answer++;
			}
		}


		System.out.println(answer);
	}


	public static class MyScanner {
		Scanner sc = new Scanner(System.in);
		String next() { return sc.next();}
		int nextInt() { return Integer.valueOf(sc.next());}
		long nextLong() { return Long.valueOf(sc.next()); }
	}
} public class Main {

	public static final MyScanner in = new MyScanner();

	public static void main(String[] args) {

		int N = in.nextInt();
		int M = in.nextInt();
		int[] ALL = new int[N+M];
		for(int i=0;i<N;i++) {
			ALL[i] = 2;
		}
		for(int i=N;i<N+M;i++) {
			ALL[i] = 1;
		}

		int answer = 0;
		for(int i=0;i<N+M-1;i++) {
			for(int j=i+1;j<N+M;j++) {
				if ((ALL[i] + ALL[j]) % 2 == 0) answer++;
			}
		}


		System.out.println(answer);
	}


	public static class MyScanner {
		Scanner sc = new Scanner(System.in);
		String next() { return sc.next();}
		int nextInt() { return Integer.valueOf(sc.next());}
		long nextLong() { return Long.valueOf(sc.next()); }
	}
} Main
import java.util.Scanner;

public class Main {

	public static final MyScanner in = new MyScanner();

	public static void main(String[] args) {

		int N = in.nextInt();
		int M = in.nextInt();
		int[] ALL = new int[N+M];
		for(int i=0;i<N;i++) {
			ALL[i] = 2;
		}
		for(int i=N;i<N+M;i++) {
			ALL[i] = 1;
		}

		int answer = 0;
		for(int i=0;i<N+M-1;i++) {
			for(int j=i+1;j<N+M;j++) {
				if ((ALL[i] + ALL[j]) % 2 == 0) answer++;
			}
		}


		System.out.println(answer);
	}


	public static class MyScanner {
		Scanner sc = new Scanner(System.in);
		String next() { return sc.next();}
		int nextInt() { return Integer.valueOf(sc.next());}
		long nextLong() { return Long.valueOf(sc.next()); }
	}
}