#include <bits/stdc++.h>
using namespace std;
string kata, kat, tmp;
int i, j, t;
bool val, cek;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> kata;
  cin >> kat;
  kata.length() < kat.length() ? cek = 0 : cek = 1;
  if (cek == 0) {
    cout << 0 << "\n";
    return 0;
  }
  for (i = 0; i <= kata.length() - kat.length(); i++) {
    val = 1;
    for (j = i; j < i + kat.length(); j++) {
      if (val == 0) break;
      kata[j] != kat[j - i] ? val = 0 : val = val;
      if (val == 0) break;
    }
    (val) ? t++ : t = t;
    val ? i += kat.length() - 1 : i = i;
  }
  cout << t << "\n";
}
