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