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 = in.nextInt(); int m = in.nextInt(); BigInteger n1=BigInteger.valueOf(n); BigInteger m1=BigInteger.valueOf(m); BigInteger val=(n1.multiply(m1)).subtract(BigInteger.valueOf(1)); System.out.print(val); } }