a,b = list(map(int,input().split()))

print(((a-1)*(b-1))) 

#!/usr/bin/env python3

import sys

read = sys.stdin.buffer.read

readline = sys.stdin.buffer.readline

readlines = sys.stdin.buffer.readlines

a,b = list(map(int,input().split()))

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

#!/usr/bin/env python3
import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
a, b = list(map(int, input().split()))
print(((a - 1) * (b - 1)))

+#!/usr/bin/env python3 +import sys + +read = sys.stdin.buffer.read +readline = sys.stdin.buffer.readline +readlines = sys.stdin.buffer.readlines