# -*- coding: utf-8 -*- a,b = map(int,input().split()) ab = list(range(a,b+1)) print(3 - ab.count(23) - ab.count(24) - ab.count(25))