#include<stdio.h> int main(){ long long int a,b,M,N; while(scanf("%lld%lld",&M,&N)!=EOF) { a=M*N; b=a-1; printf("%lld\n",b); } return 0;}