n = int(input()) if n == 1: print(6) elif n == 2: print(111) elif n == 3: print(915) elif n == 4: pass else: pass