a,b=gets.split.map &:to_i
p=0
for i in 23..25
    if a<=i&&i<=b;next;end
    p+=1
end
puts p