#include <bits/stdc++.h>
using namespace std;
double eps = 1e-8;
char s[1000505];
char s1[50];
int num = 0;
int a[1000505];
void work(char *s1, char *s2, int n, int k) {
  bool flag = true;
  for (int i = 0; i < n; i++) {
    if (s1[i] != s2[i]) {
      flag = false;
      break;
    }
  }
  if (flag) {
    bool ok = false;
    for (int i = 0; i < n; i++) {
      if (a[i + k]) ok = true;
    }
    if (!ok) {
      num++;
      a[k + n - 1]++;
    }
  }
}
int main() {
  scanf("%s", s);
  scanf(" %s", s1);
  int ans = 0;
  int len = strlen(s1);
  int n = strlen(s);
  for (int i = 0; i <= (n - len); i++) {
    work(s + i, s1, len, i);
  }
  cout << num << endl;
  return 0;
}
