import java.io.*; import java.util.*; public class Solution { public static void main(String[] args) { Scanner in = new Scanner(System.in); long l = in.nextInt(); long b = in.nextInt(); long cuts = (l*b)-1; System.out.format("%d",cuts); } }