let solve n = 
  (n / 11) * 2 + ((n mod 11)/6) + (if (n mod 11) mod 6 > 0 then 1 else 0)

let () =
  let rec read () =
    try let ans = (Scanf.scanf "%d\n" solve) in
        Printf.printf "%d\n" ans
    with End_of_file -> ()
  in
  read ()
;;
