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