import java.util.Scanner;
public class P1543 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int answer = 0, index = 0;
String doc = sc.nextLine(), word = sc.nextLine();
while(index <= doc.length() - word.length() && index + word.length() <= doc.length()) {
if(doc.substring(index, index + word.length()).equals(word)) {
answer ++;
index += word.length();
continue;
}
index ++;
}
System.out.println(answer);
sc.close();
}
}