#include #define rep(i,n) for(int i=0;i ; const int INF = 1e9; const int MOD = 1000000007; int main(){ int d1,d2; cin >> d1 >> d2; if(2*d1 < d2) cout << 0 << endl; else if(2*d1 ==d2) cout << 4 << endl; else if(d2 ==d1) cout << 4 << endl; else if(d2 < d1) cout << 0 << endl; else cout << 8 << endl; return 0; }