// ※※※ 解答不能 ※※※. // https://yukicoder.me/submissions/436625 #include using namespace std; #define repex(i, a, b, c) for(int i = a; i < b; i += c) #define repx(i, a, b) repex(i, a, b, 1) #define rep(i, n) repx(i, 0, n) #define repr(i, a, b) for(int i = a; i >= b; i--) int main(){ char c1[1010], c2[1010]; scanf("%s %s", c1, c2); string S(c1), T(c2); if(string(S).find(T) == -1){ puts("0"); }else{ if(T.size() == 1){ puts("-1"); }else{ int ans = 0; int L = T.size(); rep(i, S.size() + 1 - L){ if(S.substr(i, L) == T){ ans++; i += L - 2; } } printf("%d\n", ans); } } return 0; }