# -*- coding:utf-8 -*- #全探索も計算量的にいけるなら躊躇なく書かなければな import itertools if __name__ == "__main__": k = input() a = [2,3,5,7,11,13] b = [4,6,8,9,10,12] c = [0,1,2,3,4,5] ans = 0 for i, j in itertools.product(c,repeat = 2): if a[i] * b[j] == k: ans += 1 print ans / 36.0