N = int(input()) a = (10**N//7)/10**N prob = 0 if a == 0.0: prob = int(a) else: prob = a print(prob)