{-# LANGUAGE BangPatterns #-}
import Data.List
import Data.Maybe
import Data.Function (fix)
import Data.Array (Array, array, (!))
import qualified Data.ByteString as BS
import qualified Data.ByteString.Char8 as BS8

modular :: Integer
modular = 1000000007
 
getInts :: IO [Int]
getInts = (map parseInt . BS8.words) <$> BS.getLine 
    where parseInt = fst . fromJust . BS8.readInt

solve :: Integer -> Integer
solve n
    | n == 0 = 0
    | n <= 6 = 1
    | n < 11 = 2
    | otherwise = 2 * (n `div` 11) + solve (n `mod` 11)

main :: IO ()
main = do
    [n] <- getInts
    print $ solve (fromIntegral n)