#include <bits/stdc++.h>
using namespace std;
inline int in() {
  int res = 0;
  char c;
  int f = 1;
  while ((c = getchar()) < '0' || c > '9')
    if (c == '-') f = -1;
  while (c >= '0' && c <= '9') res = res * 10 + c - '0', c = getchar();
  return res * f;
}
const int N = 100010;
char a[N], b[456];
int main() {
  gets(a);
  gets(b);
  int n = strlen(a), m = strlen(b);
  int ans = 0;
  for (int i = 0; i + m - 1 < n;) {
    bool f = 1;
    for (int j = 0; j < m; j++) {
      if (b[j] != a[i + j]) {
        f = 0;
        break;
      }
    }
    if (f) {
      i += m;
      ans++;
    } else
      i++;
  }
  cout << ans;
  return 0;
}
