#include <bits/stdc++.h>
using namespace std;
int main() {
  char s1[100003], s2[31];
  int i, j;
  int l1, l2;
  while (scanf("%s%s", &s1, &s2) != EOF) {
    int s = 0;
    l1 = strlen(s1);
    l2 = strlen(s2);
    for (i = 0; i < l1; i++) {
      int x = 0;
      for (j = 0; j < l2; j++) {
        if (i + j > l1) {
          x = 1;
          break;
        }
        if (s1[i + j] != s2[j]) {
          x = 1;
          break;
        }
      }
      if (x == 0) {
        s1[i + j - 1] = '#';
        s++;
      }
    }
    printf("%d\n", s);
  }
  return 0;
}
