#include <bits/stdc++.h>
using namespace std;
string s, t;
int ans = 0, last;
bool found;
int main() {
  cin >> s;
  cin >> t;
  if (s.length() < t.length()) {
    cout << "0\n";
    return 0;
  }
  for (int i = 0; i <= s.length() - t.length(); i++) {
    found = true;
    for (int j = 0; j < t.length(); j++) {
      if (s[i + j] != t[j]) {
        found = false;
      }
    }
    if (found) {
      s[i + t.length() - 1] = '#';
      ans++;
    }
  }
  cout << ans << endl;
  return 0;
}
