#include using namespace std; #define int long long template void fin(T a){ cout< P; signed main(){ string s;cin>>s; map m; for(char p:s)m[p]++; vector

v; for(auto p:m){ int a=p.first-'0',b=p.second; v.push_back(P(a,b)); } reverse(v.begin(),v.end()); if(v.size()==1)fin(-1); if(v[0].second==1&&v[1].first==0)fin(-1); for(int i=0;i