fn main() { let mut n = String::new(); std::io::stdin().read_line(&mut n).ok(); let mut n: usize = n.trim().parse().unwrap(); let mut result = 0usize; for i in 0.. { if i % 7 == 6 { n += 6; } n -= 1; result += 1; if n == 0 { break; } } println!("{}", result); }