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