import java.util.*; public class cc { public static void main(String[] args) { Scanner s =new Scanner(System.in); int r=s.nextInt(); int c=s.nextInt(); System.out.println((r*(c-1))+((r-1)*c)); } }