#include using namespace std; int main(){ string s; cin >> s; if(s[0]!='1') cout << -1 << endl; bool flag = false; for(int i=1;i