import java.io.*; import java.util.*; public class Solution { public static void main(String[] args) { Scanner scan = new Scanner(System.in); long n = scan.nextLong(); long m = scan.nextLong(); scan.close(); long result = n * m - 1; System.out.println(result); } }