N = gets.to_i day = 0 n = N ans = 0 while n > 0 day += 1 n -= 1 ans += 1 n += 6 if day % 7 == 0 end puts ans