import java.util.*; import java.io.*; public class Main { void solve (FastScanner in, PrintWriter out) { String s = in.next(); if (s.charAt(0) != '1') { out.println(-1); return; } for (int i=1; i