n = gets.to_i ans = 0 i = 0 while n > 0 i += 1 ans += 1 if i == 7 then n += 6 i = 0 end n -= 1 end puts ans