#include <iostream>
using namespace std;
int main() {
string A, B;
getline(cin, A);
getline(cin, B);
int count = 0;
for (int i = 0; i <= B.length() - A.length(); i++) {
bool found = true;
for (int j = 0; j < A.length(); j++) {
if (B[i+j] != A[j]) {
found = false;
break;
}
}
if (found) {
count++;
}
}
cout << count;
return 0;
}