#include using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) typedef long long ll; typedef pair P; int main() { string S, T; cin >> S >> T; int num = 0; rep(i,S.size()-T.size()+1){ bool l = false; for (int j = 0; j < T.size();j++){ if(S.at(i+j)!=T.at(j)){ l = true; } } if(!l){ if(T.size()==1){ cout << -1 << endl; return 0; } num++; i += T.size()-2; } } cout << num << endl; }