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 in = new Scanner (System.in); int n,m; n= in.nextInt(); m= in.nextInt(); BigInteger a=new BigInteger(String.valueOf(n)); BigInteger b=new BigInteger(String.valueOf(m)); a=a.multiply(b); a=a.subtract(new BigInteger("1")); System.out.println(a); } }