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 s = new Scanner(System.in); long n = s.nextLong(); long m = s.nextLong(); System.out.println(m * n - 1); } }