import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; import java. util. Scanner; 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. */ long m,n,out; Scanner sc =new Scanner(System.in); m=sc.nextLong(); n=sc.nextLong(); out=m*n-1; System.out.println(out); } }