#include #define trace1(a) cout<<#a<<": "<=(int)(b);--i) #define fore(x,a) for(auto &x:a) #define all(a) (a).begin(),(a).end() #define rall(a) (a).rbegin(),(a).rend() #define isin(i,a,b) ((a) <= (i) && (i) <= (b)) #define uni(a) (a).erase(unique(all(a)),(a).end()) #define dup(x,y) (((x)+(y)-1)/(y)) #define fi first #define se second #define pb push_back #define eb emplace_back #define sz(a) ((long long)(a).size()) #define v(T) vector #define vv(T) v(v(T)) using namespace std; using ll = long long; using vi = vector; using unit= unsigned; using vl = vector; using ull = unsigned long long; using vvi = vector; using vvl = vector; using pii = pair; using vpii= vector; using pil = pair; using vpil= vector; using pli = pair; using vpli= vector; using pll = pair; using vpll= vector; void _main(); int main(){ cin.tie(0); ios::sync_with_stdio(false); _main(); } templatestring join(const v(T)&v){ stringstream s; rep(i,0,sz(v))s<<' '<istream &operator>>(istream&i, v(T)&v){ fore(x,v){ i >> v; } return i; } templateostream &operator<<(ostream&o, const v(T)&v){ o<<"["; fore(x,v)o<ostream &operator<<(ostream&o, const deque&v){ o<<"deq["; fore(x,v)o<ostream &operator<<(ostream&o, const set&v){ o<<"{"; fore(x,v)o<ostream &operator<<(ostream&o, const unordered_set&v){ o<<"{"; fore(x,v)o<ostream &operator<<(ostream&o, const multiset&v){ o<<"{"; fore(x,v)o<ostream &operator<<(ostream&o, const unordered_multiset&v){ o<<"{"; fore(x,v)o<ostream &operator<<(ostream &o, const pair&p){ o<<"("<ostream &operator<<(ostream &o, const map&m){ o<<"{"; fore(x,m)o<"<ostream &operator<<(ostream &o, const unordered_map&m){ o<<"{"; fore(x,m)o<"<void YES(T c){ if(c) cout<<"YES"<void Yes(T c){ if(c) cout<<"Yes"<< endl; else cout<<"No"<void POSS(T c){ if(c) cout<<"POSSIBLE"<void Poss(T c){ if(c) cout<<"Possible"<void chmax(T &a, const T &b){ if(avoid chmin(T &a, const T &b){ if(bT gcd(T a, T b){ return b?gcd(b,a%b):a; } templateT lcm(T a, T b){ return a/gcd(a,b)*b; } const double EPS = 1e-10; const double PI = acos(-1.0); const int INF = 1001002003; const ll LINF= 1001002003004005006LL; const int dx[] = { -1, 0, 1, 0 , -1,-1, 1, 1 }; const int dy[] = { 0, 1, 0,-1 , -1, 1,-1, 1 }; void _main() { string s, t; cin >> s >> t; int sn=sz(s), tn=sz(t); int i=0, ans = 0; while (i < sn-tn+1) { if (s[i] != t[0]) { ++i; continue; } bool same = true; rep(j,0,tn) { if (s[i+j] != t[j]) { same = false; break; }; } if (!same) { ++i; continue; } ++ans; i += tn-1; } cout << ans << endl; }