import Control.Monad
main = readLn >>= print . solve

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