use std::io::Read; fn main() { let mut s = String::new(); std::io::stdin().read_to_string(&mut s).ok(); let s: Vec<_> = s.lines().collect(); if s[1].len() == 1 && s[0].contains(s[1]) { println!("-1"); return; } let (mut n, mut p) = (0, 0); while let Some(i) = s[0][p..].find(s[1]) { p += i + s[1].len() - 1; n += 1; } println!("{}", n) }