n = int(input()) c = 0 t = 0 while n != t: c += 1 if c%7 == 1 or c%7 == 2 or c%7 == 5: t += 2 else: t -= 1 print(c)