import java.io.*; import java.util.*; class PaperCut { public static void main(String[] args) throws IOException{ BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); String[] input = in.readLine().split("\\s+"); long m = Integer.parseInt(input[0]); long n = Integer.parseInt(input[1]); System.out.println(m*n-1); } }