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) { Scanner sc = new Scanner(System.in); long n = sc.nextLong(); long m = sc.nextLong(); long cnt=0; //long row = (n-1); //long col = (m -1)*m; long tot = (n*m)-1; System.out.println(tot); } }