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

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