#include <bits/stdc++.h>
using namespace std;
int main() {
  string ss, s;
  cin >> ss;
  cin >> s;
  if (s.size() > ss.size()) {
    cout << "0"
         << "\n";
    return 0;
  }
  int position = ss.find(s);
  int ans = 0;
  while (position != string::npos) {
    ans++;
    position = ss.find(s, position + s.size());
  }
  cout << ans << "\n";
  return 0;
}
