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