x = int(input()) s = 0 s1 = 0 if x % 2 == 0: s = x + 1 else: s = x for i in range(s,200):#因为x的范围最大是100所以最好最后100后面第6个的奇#数的数 if s1 == 6: break if i % 2 != 0: s1 += 1 print(i)