import java.util.Scanner; import java.util.Arrays; class squares { public static void main(String args[]) { Scanner scan=new Scanner(System.in); long n=scan.nextLong(); long m=scan.nextLong(); System.out.println(m*n-1); } }