fn main() { let mut mn = String::new(); std::io::stdin().read_line(&mut mn).ok(); let mut mn = mn.trim().split_whitespace(); let mut m: u32 = mn.next().unwrap().parse().unwrap(); let mut n: u32 = mn.next().unwrap().parse().unwrap(); let (mut t, mut ans) = (0u32, 0u32); while m != n { if m < n { t = m; m = n; n = t; } else { m -= n } ans += 1; } println!("{}", ans); }