#include <bits/stdc++.h>
using namespace std;
int dx[4] = {0, 0, 1, -1};
int dy[4] = {1, -1, 0, 0};
string a, b;
int main() {
  cin >> a >> b;
  int la = a.length(), lb = b.length();
  int i = 0, j = 0, ans = 0;
  while (i <= la - lb) {
    int flag = 1;
    for (int j = 0; j <= b.length() - 1; j++)
      if (a[i + j] != b[j]) flag = 0;
    if (flag) {
      ans++;
      i += b.length();
    } else
      i++;
  }
  cout << ans << endl;
}
