#include #include #include #include #include #include #include #include #include #include #include #include using namespace std; #define rep(i, n) for(int(i) = 0; (i) < (n); (i)++) #define FOR(i, m, n) for(int(i) = (m); (i) < (n); (i)++) #define All(v) (v).begin(), (v).end() #define pb push_back #define MP(a, b) make_pair((a), (b)) using ll = long long; using pii = pair; using pll = pair; const int INF = 1 << 30; const ll LINF = 1LL << 60; const int MOD = 1e9 + 7; int main() { int D1, D2; cin >> D1 >> D2; if(D1 < D2 && 2 * D1 * D1 > (D2 * D2)) { cout << 8 << endl; } else if(D1 == D2) { cout << 4 << endl; } else { cout << 0 << endl; } return 0; }