import Data.Int (Int64)

solve :: Integral a => a -> a
solve x
    | m <= 0 = s
    | 1 <= m && m <= 6 = s + 1
    | otherwise = s + 2
    where
        (d, m) = divMod x 11
        s = d * 2

main :: IO ()
main = print . solve =<< (readLn :: IO Int64)
