#include #include #include #include #include #define all(x) x.begin(),x.end() #define pb push_back #define ll long long #define P pair #define LP pair using namespace std; int main() { int a, b; cin >> a>>b; if (b < 23) cout << 3 << endl; else if (b < 26) { if (a < 23) cout << 25 - b ; else if (a < 26) cout << 3 - (b - a + 1); } else { if (a < 23) cout << 0; else if (a < 26) cout<<3-(25 - a + 1); else cout << 3; } return 0; }