N=int(input())
ans=""
for i in range(N-1,-1,-1):
    ans=ans+str(i)*N
print(ans if N!=1 else 1)