main :: IO ()
main = print =<< solve <$> readLn

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