#include <stdio.h>
#include <string.h>
int length(char s[]) {
int i = 0;
while (s[i] != '\0') {
i++;
}
return i;
}
int result(char a[], char b[]) {
int size_a = length(a);
int size_b = length(b);
int counter = 0;
if (size_a >= size_b) {
for (int i = 0; i < size_a - size_b + 1; i++) {
int sum = 0;
for (int j = 0; j < size_b; j++) {
if (a[i + j] == b[j]) {
sum++;
}
}
if (sum == size_b) {
counter++;
}
}
}
return counter;
}
void remove_newline(s[]) {
int i = 0;
int size = length(s);
while (i < size) {
if (s[i] == '\n') {
s[i] = '\0';
return;
}
i++;
}
}
int main() {
char a[1001];
char b[101];
fgets(a, 1001, stdin);
fgets(b, 1001, stdin);
remove_newline(a);
remove_newline(b);
printf("%d", result(a, b));
return 0;
}