import java.util.Scanner; public class Main { public static void main(String[] a) { Scanner s=new Scanner(System.in); long R=s.nextLong(),C=s.nextLong(); System.out.println(R*C/(R==C?4:2)-1); } }