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) throws IOException { //BufferedReader bf = new BufferedReader ( new InputStreamReader (System.in)); Scanner scan = new Scanner (System.in); //int in = Integer.parseInt(bf.readLine()); long im = scan.nextLong(); long in = scan.nextLong(); //int im = Integer.parseInt(bf.readLine()); System.out.println((im*in)-1); } }