#include "bits/stdc++.h" #define rep(i,n) for(int i=0;i> S >> T; if (T.size() == 1) { rep(i, S.size()) { if (S[i] == T[0]) { cout << "-1\n"; return 0; } } cout << "0\n"; return 0; } int ans = 0; rep(i, S.size() - T.size() + 1) { if (S.substr(i, T.size()) == T) { ans++; i = i + T.size() - 2; } } cout << ans << endl; }