import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; public class Solution { static int nombre = 0; 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 in = new Scanner(System.in); long n = in.nextInt(); long m = in.nextInt(); long nombre = (n*m)-1; System.out.println(nombre); } public static int couperEn2 (long n, long m){ if(( n > m && m != 1) || (n == 1 && m != 1 )){ nombre++; if(( m % 2 == 1)){ couperEn2 (n, m/2); couperEn2 (n, m/2 + 1); }else{ couperEn2 (n, m/2); couperEn2 (n, m/2); } } else if ((n <= m && n != 1) || (m == 1 && n != 1)){ nombre++; if( n % 2 == 1){ couperEn2 (n/2, m); couperEn2 (n/2 + 1, m); } else{ couperEn2 (n/2, m); couperEn2 (n/2, m); } } return nombre; } }