<gh_stars>0
#-------------------------------------------------------------------------------
# Name:        module1
# Purpose:
#
# Author:      mo-mo-
#
# Created:     18/08/2018
# Copyright:   (c) mo-mo- 2018
# Licence:     <your licence>
#-------------------------------------------------------------------------------

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

ans = (a-1)*(b-1)
print(ans)
#-------------------------------------------------------------------------------
# Name:        module1
# Purpose:
#
# Author:      mo-mo-
#
# Created:     18/08/2018
# Copyright:   (c) mo-mo- 2018
# Licence:     <your licence>
#-------------------------------------------------------------------------------

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

ans = (a-1)*(b-1)
print(ans)
#------------------------------------------------------------------------------- # Name:        module1 # Purpose: # # Author:      mo-mo- # # Created:     18/08/2018 # Copyright:   (c) mo-mo- 2018 # Licence:     <your licence> #-------------------------------------------------------------------------------