#include <bits/stdc++.h>
const long long INF = LLONG_MAX;
const long long NINF = LLONG_MIN;
const long long MAX = 1e6 + 5;
const long long MOD = 1e9 + 7;
using namespace std;
inline long long gcd(long long a, long long b) {
  long long t;
  if (a < b) {
    t = a;
    a = b;
    b = t;
  }
  while (b != 0) {
    t = a;
    a = b;
    b = t % b;
  }
  return a;
}
inline long long mpow(long long a, long long b) {
  long long ans = 1;
  while (b != 0) {
    if (b & 1) {
      ans = ans * a;
    }
    a = a * a;
    b >>= 1;
  }
  return ans;
}
inline long long mlog2(long long n) {
  long long c = 0;
  c += 64 - __builtin_clzll(n);
  if (__builtin_popcountll(n) == 1) {
    c--;
  }
  return c;
}
void troll() {
  long long qwe[100000];
  for (long long i = 0; i < 1; i++)
    ;
}
long long ass[MAX];
long long ssa[MAX];
int main() {
  troll();
  string str1, str2;
  cin >> str1 >> str2;
  long long count = 0;
  for (long long i = 0; i < str1.size();) {
    long long flag = 1;
    if (str1[i] == str2[0]) {
      long long j = 1;
      for (j = 1; j < str2.size(); j++) {
        if (str2[j] != str1[i + j]) {
          flag = 0;
          break;
        }
      }
      if (!flag) {
        flag = 1;
        i++;
      } else {
        i += j;
        count++;
      }
    } else {
      i++;
    }
  }
  troll();
  cout << count << "\n";
  return 0;
}
