import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; 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. */ Scanner sc = new Scanner(System.in); long n = sc.nextInt(); long m = sc.nextInt(); long a=0; long b=0; if(n>=m){ a= n; b=m; }else{ a= m; b=n; } System.out.println(b-1+ (a-1)*b); } }