#include <bits/stdc++.h>
using namespace std;
int const N = 1e6;
int n, m, x, y, t, ans, res, sum, mxx, mx, c, d, e, mn = 1e9, z, a, b, cnt, A,
                                                    k, l, G, C, T, mnn = 1e9;
string s, s1, s2, s3, ss, ss1;
set<int> st;
set<int>::iterator it;
pair<string, string> p[N];
vector<int> v, v1, v2, v3, v4;
map<int, int> mp, mpp;
deque<int> d3, d1, d2;
char c1;
bool tr = false, fl = false;
long long used[1000000];
int main() {
  cin >> s >> s1;
  if (s1.size() > s.size()) {
    cout << 0;
    return 0;
  }
  for (int i = 0; i < s.size(); i++) {
    cnt = 0;
    for (int j = 0; j < s1.size(); j++) {
      if (s[j + i] == s1[j]) cnt++;
    }
    if (cnt == s1.size()) {
      ans++;
      i += s1.size() - 1;
    }
  }
  cout << ans;
}
