fn main() { let n = read::(); let mut a = vec![]; for i in 0..n { a.push(read::()); } if (0..n - 1).all(|i| a[i + 1] - a[i] > 1) { println!("1"); } else { println!("2"); } } fn read() -> T { let mut s = String::new(); std::io::stdin().read_line(&mut s).ok(); s.trim().parse().ok().unwrap() }