K=int(input()) A=[2,3,5,7,11,13] B=[4,6,8,9,10,12] c=0 t=0 for i in A: for j in B: c+=1 if i*j==K:t+=1 print(t/c)