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