#include using namespace std; void no_1005(void) { string s, t; cin >> s >> t; int t_size = (int)t.size(); int tcnt = 0; int ptr = 0; while (true) { string s_tmp = s.substr(ptr, t_size); if (s_tmp == t) { tcnt++; ptr += t_size; } else ptr++; if (ptr >= (int)s.size() - t_size + 1) break; } if (t.size() == 1) tcnt = -1; cout << tcnt << endl; } int main(void) { no_1005(); return 0; }