#include <bits/stdc++.h>
using namespace std;
int main() {
  string str, org;
  cin >> str >> org;
  int cnt = 0;
  for (int i = 0; i <= signed(str.size() - org.size()); i++) {
    bool flag = true;
    for (int j = 0; j < org.size(); j++)
      if (str[i + j] != org[j]) flag = false;
    if (!flag) continue;
    cnt++;
    i += org.size() - 1;
  }
  cout << cnt << endl;
  return 0;
}
