#include #define rep(i, n) for (int i = 0; i < n; ++i) typedef long long ll; using namespace std; int main() { string S, T; cin >> S >> T; int ans = 0; rep(i, S.size()) { if (strncmp(&S[i], &T[0], T.size()) == 0) { ans++; i += T.size() - 1; } } if (T.size() == 1) ans = -1; cout << ans << endl; return 0; }