N=input()+1 a,l,c,r=N,[1],0,{} while c0) print[-1,a][a