import cmath import math from fractions import Fraction N = int(input()) M = 1 * 2 * 3 * 4 * 5 * 6 * 7 * 8 * 9 val = 0 for k in range(M): num = cmath.exp(2 * k * N * math.pi * 1j / M) dnm = cmath.exp(4 * k * math.pi * 1j / M) dnm += cmath.exp(2 * k * math.pi * 1j / M) dnm += 10 val += num / dnm val /= M # print(val) x = Fraction(val.real) y = x.limit_denominator(10**(-N+1)) # print(y) y_num = y.numerator y_dnm = y.denominator tmp = y_dnm c2 = 0 c5 = 0 while tmp % 2 == 0: c2 += 1 tmp //= 2 while tmp % 5 == 0: c5 += 1 tmp //= 5 # print(c2, c5, tmp) if c2 > c5: y_num *= 5**(c2-c5) y_dnm *= 5**(c2-c5) elif c2 < c5: y_num *= 2**(c5-c2) y_dnm *= 2**(c5-c2) print(y_num, y_dnm, sep='/')