a,b=gets.split.map(&:to_i) p ([23,24,25]-(a!=b ? (a..b).to_a : [a,])).size