Ndata = int(input()); powerd = round(1/7 * (10**Ndata),Ndata); print(powerd);