#include using namespace std; #define int long long signed main(){ string S; cin>>S; S += "000"; for(int i=0;i