#include using namespace std; int main() { string S, T; cin >> S >> T; int ans = 0; string::size_type pos = 0; if( T.size() == 1 ) { pos = S.find( T, pos ); if( pos != string::npos ) ans = -1; } else { while( true ) { pos = S.find( T, pos ); if( pos == string::npos ) break; S.insert( pos + T.size() - 1, string( "." ) ); ans++; } } cout << ans << endl; }