#include using namespace std; int main(){ int a, b; cin >> a >> b; if(a < 23 && (b >= 23 && b <= 25)){ b -= 22; cout << b; }else if(b > 25 && (a >= 23 && a <= 25)){ a = 26 - a; cout << a; }else if((a >= 23 && a <= 25) && (b >= 23 && b <= 25)){ b -= a + 1; cout << b; }else{ cout << 0; } return 0; }