#include <bits/stdc++.h>
using namespace std;
int main() {
  string s, s1;
  int ans = 0;
  cin >> s;
  cin >> s1;
  int l1 = s.length();
  int l2 = s1.length();
  for (int i = 0; i < l1; i++) {
    if (l1 - i < l2) break;
    for (int j = 0; j < l2; j++) {
      if (s[i + j] != s1[j]) break;
      if (j == (l2 - 1) && s[i + j] == s1[j]) {
        ans += 1;
        i = i + l2 - 1;
      }
    }
  }
  cout << ans << '\n';
  return 0;
}
