#include <bits/stdc++.h>
using namespace std;
string a, b;
char s[200000], p[50];
int ans = 0;
bool check(int l, int r) {
  int j = 1;
  for (int i = l; i <= r; ++i) {
    if (s[i] != p[j]) {
      return false;
    }
    j++;
  }
  return true;
}
int main() {
  std::ios::sync_with_stdio(false);
  cin >> a >> b;
  int n = (int)a.size();
  int m = (int)b.size();
  for (int i = 1; i <= n; ++i) s[i] = a[i - 1];
  for (int i = 1; i <= m; ++i) p[i] = b[i - 1];
  for (int i = 1; i <= n - m + 1; ++i) {
    if (check(i, i + m - 1)) {
      s[i + m - 1] = '#';
      ans++;
    }
  }
  cout << ans;
  return 0;
}
