import java.io.*; import java.util.*; public class Solution { public static void main(String[] args) { Scanner in = new Scanner(System.in); long n = in.nextLong(); long m = in.nextLong(); System.out.println(n*m-1); /*long min = Math.min(n, m); if(min < 4) { System.out.println(n*m-1); } else { long pow = 4; long count = 0; while(min/pow > 0) { if(pow != 4) { count = count * 4 + 2; } if(min != pow) { pow *= 2; } else { break; } } System.out.println((pow/4)*(pow/4)*14 + count + n*m-pow*pow); }*/ } }