#include using namespace std; #define modulo 1000000007 #define mod(mod_x) ((((long long)mod_x+modulo))%modulo) #define Inf 2000000000000000000 int main(){ long long N,M; cin>>N>>M; long long ans = 0LL; if(N%2==1){ ans += M/4; } if(M%2==1){ ans += N/4; } if((N%2==0&&N>=6)||(M%2==0&&M>=6)){ ans = min(ans,1LL); } cout<