into = input() a, i = into.split(' ') bribe = int(a)*(int(i) - 1) + 1 print(bribe)