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. */ BufferedReader in = null; long answer = 0; try { in = new BufferedReader(new InputStreamReader(System.in)); String[] input = in.readLine().split(" "); long n = Integer.parseInt(input[0]); long m = Integer.parseInt(input[1]); answer = n * m - 1; } catch (IOException e) { e.printStackTrace(); } finally { try { in.close(); } catch (IOException e) { e.printStackTrace(); } } System.out.println(answer); } }