fn read() -> T { let mut s = String::new(); std::io::stdin().read_line(&mut s).ok(); s.trim().parse().ok().unwrap() } fn main() { let s: String = read(); let t: String = read(); let mut ans = 0; if s.len() > t.len() { for i in 0..(s.len() - t.len() + 1) { if &s[i..(i + t.len())] == t { ans += 1; }; } }; println!("{}", ans); }