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) { /* Enter your code here. Read input from STDIN. Print output to STDOUT. Your class should be named Solution. */ try{ BufferedReader read = new BufferedReader(new InputStreamReader(System.in)); String input = read.readLine(); String arr[] = input.split(" "); long n = Long.parseLong(arr[0]); long m = Long.parseLong(arr[1]); System.out.println((n*m)-1); }catch(Exception e){ } } }