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

print(((a-1)*(b-1)))
def main():

    n,m = list(map(int,input().split()))

    print(((n-1)*(m-1)))



if __name__ == '__main__':

    main()

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

def main():
    n, m = list(map(int, input().split()))
    print(((n - 1) * (m - 1)))


if __name__ == "__main__":
    main()

-a, b = list(map(int, input().split())) -print(((a - 1) * (b - 1))) +def main(): +    n, m = list(map(int, input().split())) +    print(((n - 1) * (m - 1))) + + +if __name__ == "__main__": +    main()