#include <stdio.h>
#include <stdlib.h>

int main()
{
    int n, m, x;
    scanf("%d%d", &n, &m);
    if(n>1&&m>1){
        x=n+m-2+(n*m)/2;
    }
    else{
        x=n+m-1;
    }
    printf("%d", x);
    return 0;
}