L, R = map(int, input().split()) print(int(L <= 295) + int(L <= 416 and R >= 296) + int(R >= 417) - 1)