import java.util.Scanner

object Main extends App {
  val sc = new Scanner(System.in)
  val x = sc.nextLong
  val ans = if (x == 0) 0 else {
    val (d, m) = (x / 11L, x % 11L)
    d * 2L + (m match {
      case mm if mm > 6 => 2
      case mm if mm == 0 => 0
      case _ => 1
    })
  }
  println(ans)
}
