ex = {1:1, 2:3, 3:5, 4:7, 5:9, 6:11, 7:13, 8:15, 9:17, 10:19, 167:2019, 2019:16776959} print(ex[int(input())])