#include <bits/stdc++.h>
using namespace std;
int main() {
  string s, s1;
  cin >> s >> s1;
  int answer = 0;
  int i = 0;
  if (s1.length() > s.length()) {
    cout << 0;
    return 0;
  }
  while (i < s.length() - s1.length() + 1) {
    bool flag = true;
    for (int j = 0; j < s1.length(); j++)
      if (s[i + j] != s1[j]) {
        i += 1;
        flag = false;
        break;
      }
    if (flag) {
      answer++;
      i += s1.length();
    }
  }
  cout << answer;
  return 0;
}
