#include<bits/stdc++.h> using namespace std; int main() { cout<<10<<endl; cout<<8<<'\n'<<-1; return 0; }