import java.io.*; import java.util.*; 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. */ Scanner obj=new Scanner(System.in); int n,m; n=obj.nextInt(); m=obj.nextInt(); long res=(long)n*m; System.out.println(res-1); } }