import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; public class Solution { public static void main(String[] args) { /* Enter your code here. Read input from STDIN. Print output to STDOUT. Your class should be named Solution. */ Scanner sc=new Scanner(System.in); int a=sc.nextInt(); int b=sc.nextInt(); int tempA=a; int tempB=b; int count=0; int max=1; /* if(a!=1&& b!=1) max=a; while(tempA!=1 || tempB!=1) { count++; if(tempA!=1) tempA--; else if(tempB!=1) tempB--; }*/ System.out.println(a*b-1); } }