import java.io.*; import java.util.*; public class Solution { public static void main(String[] args) throws IOException{ /* Enter your code here. Read input from STDIN. Print output to STDOUT. Your class should be named Solution. */ BufferedReader scan = new BufferedReader(new InputStreamReader(System.in)); String s[] = scan.readLine().split(" "); long ans = Long.parseLong(s[0])*Long.parseLong(s[1]); System.out.println(ans-1); } }