#include using namespace std; #define int long long #define INF 101010101 int N, temp2[11000]; int huga(int a){//cout<= 1){ if(temp2[a-temp]==0){ ans = min(foo(a-temp,k+1), ans); } } if(a+temp <= N){ if(temp2[a+temp]==0){ ans = min(foo(a+temp,k+1), ans); } } return ans; } signed main(){ cin>>N; int ans = foo(1,1); if(ans==INF)cout<<-1<