print((eval('('+input().replace(' ','-1)*(')+'-1)')))
s=1

for i in input().split():s*=~-int(i)

print(s)
print((eval("(" + input().replace(" ", "-1)*(") + "-1)")))

s = 1
for i in input().split():
    s *= ~-int(i)
print(s)

-print((eval("(" + input().replace(" ", "-1)*(") + "-1)"))) +s = 1 +for i in input().split(): +    s *= ~-int(i) +print(s)