program solitario;
var N,M,a:longint;
begin
(*assign(input, 'input.txt'); reset(input);
assign(output, 'output.txt'); rewrite(output);*)
readln(N,M);
if M<N then begin a:=N; N:=M; M:=a; end;
if (N<=2) or ((N=3) and (M=3)) then writeln(N* (M-(M div 3)))
else
if N*M >25 then writeln(N*M*11 div 20+1)
else if N=3 then writeln (N*M*2 div 3 - M div 3 )
else if (N=4) and( M mod 3 =0 ) then writeln((N-1)* (M-(M div 3))+1)
else writeln((N-1)* (M-(M div 3)));
end.
cHJvZ3JhbSBzb2xpdGFyaW87CnZhciBOLE0sYTpsb25naW50OwogICAgCmJlZ2luCiAgICAoKmFzc2lnbihpbnB1dCwgICdpbnB1dC50eHQnKTsgIHJlc2V0KGlucHV0KTsKICAgIGFzc2lnbihvdXRwdXQsICdvdXRwdXQudHh0Jyk7IHJld3JpdGUob3V0cHV0KTsqKQoJcmVhZGxuKE4sTSk7CgkgaWYgTTxOIHRoZW4gYmVnaW4gYTo9TjsgTjo9TTsgTTo9YTsgZW5kOwoJIGlmIChOPD0yKSBvciAoKE49MykgYW5kIChNPTMpKSB0aGVuIHdyaXRlbG4oTiogKE0tKE0gZGl2IDMpKSkKCSAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbHNlCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiBOKk0gPjI1IHRoZW4gd3JpdGVsbihOKk0qMTEgZGl2IDIwKzEpCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UgaWYgTj0zIHRoZW4gd3JpdGVsbiAoTipNKjIgZGl2IDMgLSBNIGRpdiAzICkKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSBpZiAoTj00KSBhbmQoIE0gbW9kIDMgPTAgKSB0aGVuIHdyaXRlbG4oKE4tMSkqIChNLShNIGRpdiAzKSkrMSkKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbHNlIHdyaXRlbG4oKE4tMSkqIChNLShNIGRpdiAzKSkpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKZW5kLg==