a, b = map(int, input().split()) print(min(min(3,26 - a),min(3,b - 22),b - a + 1))