We have N+M balls, each of which has an integer written on it.

It is known that:  
 - The numbers written on N of the balls are even.
 - The numbers written on M of the balls are odd.
Find the number of ways to choose two of the N+M balls (disregarding order) so that the sum of the numbers written on them is even.

It can be shown that this count does not depend on the actual values written on the balls.

-----Constraints-----
 - 0 \leq N,M \leq 100
 - 2 \leq N+M
 - All values in input are integers.

-----Input-----
Input is given from Standard Input in the following format:
N M

-----Output-----
Print the answer.

-----Sample Input-----
2 1

-----Sample Output-----
1

For example, let us assume that the numbers written on the three balls are 1,2,4.
 - If we choose the two balls with 1 and 2, the sum is odd;
 - If we choose the two balls with 1 and 4, the sum is odd;
 - If we choose the two balls with 2 and 4, the sum is even.
Thus, the answer is 1.

Difficulty: EASY

Solutions:
(a, b) = map(int, input().split())
print(int(a * (a - 1) / 2 + b * (b - 1) / 2))


(n, m) = map(int, input().split())
r = n * (n - 1) // 2 + m * (m - 1) // 2
print(r)


(a, b) = [int(x) for x in input().split()]
print((a * a + b * b - a - b) // 2)


(n, m) = map(int, input().split())
ans = int(n * (n - 1) / 2 + m * (m - 1) / 2)
print(ans)


(n, m) = map(int, input().split())
l = n + m
print(l * (l - 1) // 2 - n * m)


(N, M) = list(map(int, input().split()))
print(N * (N - 1) // 2 + M * (M - 1) // 2)


(N, M) = map(int, input().split())
n = N * (N - 1) + M * (M - 1)
print(n // 2)


print(sum([x * (x - 1) // 2 for x in map(int, input().split())]))


(A, B) = map(int, input().split())
print(A * (A - 1) // 2 + B * (B - 1) // 2)


from math import floor
(n, m) = list(map(int, input().split()))
a = n * (n - 1) / 2
b = m * (m - 1) / 2
print(floor(a + b))


(n, m) = map(int, input().split())
print(n * ~-n // 2 + m * ~-m // 2)


(n, m) = [int(i) for i in input().split()]
print(n * (n - 1) // 2 + m * (m - 1) // 2)


(n, m) = map(int, input().split())
a = n * (n - 1) >> 1
a += m * (m - 1) >> 1
print(a)


import sys
sys.setrecursionlimit(10 ** 8)
ini = lambda : int(sys.stdin.readline())
inl = lambda : [int(x) for x in sys.stdin.readline().split()]
ins = lambda : sys.stdin.readline().rstrip()
debug = lambda *a, **kw: print('\x1b[33m', *a, '\x1b[0m', **dict(file=sys.stderr, **kw))

def solve():
	(n, m) = inl()
	return n * (n - 1) // 2 + m * (m - 1) // 2
print(solve())


(X, Y) = map(int, input().split())
print(int(X * (X - 1) / 2 + Y * (Y - 1) / 2))


(n, m) = map(int, input().split())
x = n * (n - 1) / 2 + m * (m - 1) / 2
print(int(x))


(N, M) = map(int, input().split())
ans = (N + M) * (N + M - 1) // 2 - N * M
print(ans)


(n, m) = map(int, input().split())
print(max(0, n * (n - 1) // 2 + m * (m - 1) // 2))


(n, m) = map(int, input().split())
a = n * (n - 1) // 2
b = m * (m - 1) // 2
print(a + b)


(x, y) = map(int, input().split())
print((x * (x - 1) + y * (y - 1)) // 2)


(n, w) = map(int, input().split())
print(n * (n - 1) // 2 + w * (w - 1) // 2)


(N, M) = map(int, input().split(sep=' '))
print(N * (N - 1) // 2 + M * (M - 1) // 2)


(N, M) = map(int, input().split())
all = (M * (M - 1) + N * (N - 1)) // 2
print(all)


(n, m) = list(map(int, input().split()))
sum = n * (n - 1) / 2 + m * (m - 1) / 2
print(int(sum))


print(sum((i * ~-i // 2 for i in map(int, input().split()))))


(N, M) = map(int, input().split())
x = N + M
print(x * (x - 1) // 2 - N * M)


(N, M) = map(int, input().split())
X = N * (N - 1) // 2
Y = M * (M - 1) // 2
print(X + Y)


(N, M) = list(map(int, input().split()))
ki = N * (N - 1) // 2
gu = M * (M - 1) // 2
print(ki + gu)


(n, m) = map(float, input().split())
print(int((n * (n - 1) + m * (m - 1)) / 2))


print(sum([i * (i - 1) // 2 for i in list(map(int, input().split()))]))


(e, o) = map(int, input().split())
print(e * (e - 1) // 2 + o * (o - 1) // 2)


(n, m) = map(int, input().split())
s = n * (n - 1) // 2 + m * (m - 1) // 2
print(s)


def main():
	(N, M) = tuple([int(_x) for _x in input().split()])
	print(N * (N - 1) // 2 + M * (M - 1) // 2)
main()


(N, M) = map(int, input().split())
res = (N * (N - 1) + M * (M - 1)) / 2
print(int(res))


(N, M) = map(int, input().split())
print(N * ~-N // 2 + M * ~-M // 2)


(n, m) = list(map(int, input().split()))
ans = 0
if n == 0:
	print(int(m * (m - 1) / 2))
	return
if m == 0:
	print(int(n * (n - 1) / 2))
	return
ans = n * (n - 1) / 2 + m * (m - 1) / 2
print(int(ans))


import math
(N, M) = list(map(int, input().split()))
x = N * (N - 1) / 2 + M * (M - 1) / 2
print(math.floor(x))


(N, M) = map(int, input().split())
i = N * (N - 1) / 2 + M * (M - 1) / 2
print('%d' % i)


(n, m) = map(int, input().split())
na = n * (n - 1) // 2
ma = m * (m - 1) // 2
print(na + ma)


import math, string, itertools, fractions, heapq, collections, re, array, bisect, sys, random, time, copy, bisect
from operator import itemgetter
sys.setrecursionlimit(10 ** 7)
inf = 10 ** 20
mod = 10 ** 9 + 7
stdin = sys.stdin
ni = lambda : int(ns())
nf = lambda : float(ns())
na = lambda : list(map(int, stdin.readline().split()))
nb = lambda : list(map(float, stdin.readline().split()))
ns = lambda : stdin.readline().rstrip()
(N, M) = na()
print(N * (N - 1) // 2 + M * (M - 1) // 2)


(N, M) = map(int, input().split())
a = M + N
print(int(a * (a - 1) / 2 - M * N))


(n, m) = [int(x) for x in input().split()]
print((n * (n - 1) + m * (m - 1)) // 2)


(N, M) = map(int, input().split())
c = (N * (N - 1) + M * (M - 1)) // 2
print(c)


(N, M) = map(int, input().split())
A = N * (N - 1) // 2
B = M * (M - 1) // 2
print(A + B)


(N, M) = map(int, input().split())
s = N + M
print(s * (s - 1) // 2 - N * M)


(N, M) = [int(s) for s in input().split(' ')]
print((N * (N - 1) + M * (M - 1)) // 2)


(N, M) = map(int, input().split())
print(int(N * (N - 1) / 2.0 + M * (M - 1) / 2.0))


print(sum(map(lambda x: int(x) * (int(x) - 1) // 2, input().split())))


(n, m) = map(int, input().split())
print(round((n + m) * (n + m - 1) / 2 - n * m))


import math
(n, m) = map(int, input().split())
print(n * (n - 1) // 2 + m * (m - 1) // 2)


(N, M) = map(int, input().split())
r = N * (N - 1) // 2 + M * (M - 1) // 2
print(r)


import math
(N, M) = map(int, input().split())
print((M + N) * (M + N - 1) // 2 - M * N)


(N, M) = [int(x) for x in input().split()]
print(int(N * (N - 1) / 2 + M * (M - 1) / 2))


def resolve():
	(n, m) = map(int, input().split())
	print(int(n * (n - 1) / 2 + m * (m - 1) / 2))
resolve()


(n, m) = map(int, input().split())
ex1 = n * (n - 1) // 2
ex2 = m * (m - 1) // 2
ans = ex1 + ex2
print(ans)


(n, m) = map(int, input().split())
c = n * (n - 1) / 2 + m * (m - 1) / 2
print(int(c))


(N, M) = map(int, input().split())
k = (M * (M - 1) + N * (N - 1)) // 2
print(k)


(N, M) = map(int, input().split())
K = (N + M) * (N + M - 1) / 2 - N * M
print(int(K))


(a, b) = list(map(int, input().split()))
x = int(a / 2 * (a - 1) + b / 2 * (b - 1))
print(x)


(n, m) = map(int, input().split())
k = n * (n - 1) / 2 + m * (m - 1) / 2
print(int(k))


print(sum(map(lambda i: int(i) * (int(i) - 1) // 2, input().split())))


(N, M) = map(int, input().split())
gg = N * (N - 1) // 2
kk = M * (M - 1) // 2
print(gg + kk)


import sys

def solve(N: int, M: int):
	T = N + M
	T = T * (T - 1) / 2
	return print(int(T - M * N))

def main():

	def iterate_tokens():
		for line in sys.stdin:
			for word in line.split():
				yield word
	tokens = iterate_tokens()
	N = int(next(tokens))
	M = int(next(tokens))
	solve(N, M)

def __starting_point():
	main()
__starting_point()


(g, k) = map(int, input().split())
ans = g * (g - 1) // 2 + k * (k - 1) // 2
print(ans)


import os, sys, re, math
(N, M) = [int(n) for n in input().split()]
cn = N * (N - 1) // 2
cm = M * (M - 1) // 2
print(cn + cm)


(x, y) = map(int, input().split())
a = x * (x - 1) // 2
b = y * (y - 1) // 2
print(a + b)


(N, M) = map(int, input().split())
f = lambda x: x * (x - 1) // 2
print(f(N) + f(M))