#include<iostream>
using namespace std;
int main(){
string haystack = "leetcode" ;
string needle = "leeto";
bool valid = false;
for(int i =0, j=0; i<haystack.length(); i++,j++){
if(haystack[i]==needle[j] && needle[j] != '\0'){
valid = true;
}
if(needle[j] =='\0'){
cout <<i -j;
return 0;
}
}
cout<< "-1";
}
I2luY2x1ZGU8aW9zdHJlYW0+CnVzaW5nIG5hbWVzcGFjZSBzdGQ7CmludCBtYWluKCl7CgkJc3RyaW5nIGhheXN0YWNrID0gImxlZXRjb2RlIiA7CgkJc3RyaW5nIG5lZWRsZSA9ICJsZWV0byI7CiAgICAgICAgYm9vbCB2YWxpZCA9IGZhbHNlOwogICAgICAgIGZvcihpbnQgaSA9MCwgaj0wOyBpPGhheXN0YWNrLmxlbmd0aCgpOyBpKyssaisrKXsKICAgICAgICAgICAgaWYoaGF5c3RhY2tbaV09PW5lZWRsZVtqXSAmJiBuZWVkbGVbal0gIT0gJ1wwJyl7CiAgICAgICAgICAgICAgICB2YWxpZCA9IHRydWU7ICAgICAgICAgICAgIAogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmKG5lZWRsZVtqXSA9PSdcMCcpewogICAgICAgICAgICAgICAgY291dCA8PGkgLWo7CiAgICAgICAgICAgICAgICByZXR1cm4gMDsJCiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgY291dDw8ICItMSI7IAp9