#include #define rep(i, n) for (int i = 0; i < (n); ++i) #define sz(x) int(x.size()) using namespace std; typedef long long ll; typedef pair P; const ll INF = 1LL << 60; int main() { ll D1, D2; cin >> D1 >> D2; ll d2 = D2 / 2.0; ll d1 = D1; if (D1 == D2) { cout << 4 << endl; } else if (d1 == d2) { cout << 4 << endl; } else if (d1 < d2) { cout << 0 << endl; } else { if (D2 > D1) { cout << 8 << endl; } else { cout << 0 << endl; } } }