#include using namespace std; int main(){ string S; cin>>S; int size=S.size(); bool frag=false; int M=10000; for(int i=0;i