import java.io.*; import java.util.*; public class Solution { public static void main(String[] args) { Scanner sc = new Scanner(System.in); long n = (long) sc.nextInt(); long m = (long) sc.nextInt(); System.out.println(m * n - 1); } }