n = int(input()) print('*7894561230'[n])