import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.InputStream; import java.util.Arrays; import java.util.HashSet; public class Solution{ static InputStream is; private static byte[] inbuf = new byte[1024]; static int lenbuf = 0, ptrbuf = 0; static String INPUT = ""; public static void main(String args[]) throws IOException { is = INPUT.isEmpty() ? System.in : new ByteArrayInputStream(INPUT.getBytes()); java.io.PrintWriter out = new java.io.PrintWriter(System.out); long n; long m; n = ln(); m = ln(); long x = n*m - 1; out.println(x); out.close(); } private static int ni() { int num = 0, b; boolean minus = false; while((b = readByte()) != -1 && !((b >= '0' && b <= '9')|| b == '-')); if(b == '-'){ minus = true; b = readByte(); } while(true){ if(b >= '0' && b <= '9'){ num = num * 10 + (b - '0'); }else{ return minus ? -num : num; } b = readByte(); } } private static long ln() { long num = 0, b; boolean minus = false; while((b = readByte()) != -1 && !((b >= '0' && b <= '9')|| b == '-')); if(b == '-'){ minus = true; b = readByte(); } while(true){ if(b >= '0' && b <= '9'){ num = num * 10 + (b - '0'); }else{ return minus ? -num : num; } b = readByte(); } } private static String str() { StringBuffer num=new StringBuffer() ; int b; while((b = readByte()) != -1 && !((b >= '0' && b <= '9')|| b == '.'|| b == '-'||(b >= 'a' && b <= 'z'))); while(true){ if(b >= '0' && b <= '9'|| b == '.'|| b == '-'||(b >= 'a' && b <= 'z')){ num=num.append((char)b); }else{ return num.toString(); } b = readByte(); } } private static int readByte() { if(ptrbuf >= lenbuf){ ptrbuf = 0; try { lenbuf = is.read(inbuf); } catch (IOException e) { } if(lenbuf <= 0)return -1; } return inbuf[ptrbuf++]; } }