n = int(input()) a = [0,7,103,103,3173,153 ] print(a[n])