import sequtils,strutils,math var A : array[40,int] b = stdin.readline.split.map(parseInt) ans = 3 for i in b[0]..b[1]: A[i] = 1 for i in 23..25: ans -= A[i] echo ans