
main = do
    x <- readLn
    print $ solve x

solve :: Int -> Int
solve x | m == 0 = 2*n
        | m <= 6 = 2 * n + 1
        | otherwise = 2 * n + 2
    where m = x `mod` 11
          n = x `div` 11
