#include using namespace std; #define rep(i,n) for (int i = 0; i < n; ++i) using ll = long long; const int INF=1e9; int dp[10001]; int N; void f(int x=2,int y=2){ if(x<=0||x>N||dp[x]>N; rep(i,10001)dp[i]=INF; dp[1]=0; f(); cout<<(dp[N]==INF?-1:dp[N])<