#include using namespace std; using ll=long long; int n; bool vis[20005]; void solve() { cin>>n; queue>q; q.push({1,1}); vis[1]=1; while(!q.empty()) { auto[c,d]=q.front();q.pop(); if(c==n) { cout<1&&!vis[b]) { q.push({b,d+1}); vis[b]=1; } } cout<<"-1\n"; } int main() { ios::sync_with_stdio(false);cin.tie(NULL); int tc=1; // cin>>tc; while(tc--)solve(); return 0; }