import Control.Applicative ((<$>), (<*>))
import Control.Monad
import Data.List

main :: IO ()
main = do
  solve <$> getl read >>= print

solve :: Integer -> Integer
solve n = 2 * q + f r
  where
    (q,r) = n `divMod` 11
    f x | x == 0 = 0
        | x <= 6 = 1
        | otherwise = 2

getl :: (String -> a) -> IO a
getl f = f <$> getLine
