#include <iostream>
#include <string>
using namespace std;
int main() {
string s1 = "all good is good";
int findRes;
findRes = s1.find(' ');
while (findRes < s1.length()){
s1.replace(findRes, 1, "/");
findRes = s1.find(' ');
cout << "findRes = " << findRes;
cout << " s1 size = " << s1.size();
cout << " findRes < s1.size() " << (findRes < s1.size()) << endl;
}
cout << s1.max_size();
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8c3RyaW5nPgoKdXNpbmcgbmFtZXNwYWNlIHN0ZDsKCmludCBtYWluKCkgewoJc3RyaW5nIHMxID0gImFsbCBnb29kIGlzIGdvb2QiOwoJaW50IGZpbmRSZXM7CgkKCWZpbmRSZXMgPSBzMS5maW5kKCcgJyk7Cgl3aGlsZSAoZmluZFJlcyA8IHMxLmxlbmd0aCgpKXsKCQlzMS5yZXBsYWNlKGZpbmRSZXMsIDEsICIvIik7CgkJZmluZFJlcyA9IHMxLmZpbmQoJyAnKTsKCQljb3V0IDw8ICJmaW5kUmVzID0gIiA8PCBmaW5kUmVzOwoJCWNvdXQgPDwgIiBzMSBzaXplID0gIiA8PCBzMS5zaXplKCk7CgkJY291dCA8PCAiIGZpbmRSZXMgPCBzMS5zaXplKCkgIiA8PCAoZmluZFJlcyA8IHMxLnNpemUoKSkgPDwgZW5kbDsKCX0KCWNvdXQgPDwgczEubWF4X3NpemUoKTsKCXJldHVybiAwOwp9