N = int(input()) day = 0 while N: day += 1 if day % 7 == 0: N += 6 N -= 1 print(day)