#include main() { long m,n,p,small; scanf("%ld%ld",&m,&n); if(m>n) small=n; else small=m; p=m*n-1; printf("%ld",p); }