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