#!/usr/bin/env python3 k = int(input()) n = 0 for p in [2,3,5,7,11,13]: for c in [4,6,8,9,10,12]: if p*c == k: n += 1 print('{:.16f}'.format(n/36))