solve n = 
        let 
            (q, r) = quotRem n 11
            r' = if (r >= 1) && (r <= 6) then 1 else if r <= 11 then 2 else 0
        in
            2 * q + r'

main = do
    n <- readLn :: IO Int
    print $ solve n