import java.io.*; import java.util.*; import java.math.*; public class hack42Q1 { public static void main(String[] args) throws IOException { FastScanner obj = new FastScanner(); out = new PrintWriter(new BufferedOutputStream(System.out)); long n = obj.nextLong(); long m = obj.nextLong(); out.println(n*m-1); out.close(); } //-----------PrintWriter for faster output--------------------------------- public static PrintWriter out; //-----------FastScanner class for faster input---------- public static class FastScanner { BufferedReader br; StringTokenizer tokenizer; public FastScanner() throws IOException { br = new BufferedReader(new InputStreamReader(System.in)); tokenizer = new StringTokenizer(br.readLine().trim()); } String next() { while (tokenizer == null || !tokenizer.hasMoreElements()) { try { tokenizer = new StringTokenizer(br.readLine()); } catch (IOException e) { e.printStackTrace(); } } return tokenizer.nextToken(); } int nextInt() { return Integer.parseInt(next()); } long nextLong() { return Long.parseLong(next()); } double nextDouble() { return Double.parseDouble(next()); } int[] nextIntArray() throws IOException { String[] line = br.readLine().trim().split(" "); int[] out = new int[line.length]; for (int i = 0; i < line.length; i++) { out[i] = Integer.valueOf(line[i]); } return out; } BigInteger nextBigInteger() throws IOException { return new BigInteger(next()); } String nextLine(){ String str = ""; try { str = br.readLine(); } catch (IOException e) { e.printStackTrace(); } return str; } } //-------------------------------------------------------- }