#define _CRT_SECURE_NO_WARNINGS #include #include #include #include #include #include #include #include #include using namespace std; #define REP(i,n) for(int i=0;(i)<(n);(i)++) #define ll long long int main() { int N; cin >> N; int mid = 1; REP(i, N) { mid *= 2; } mid--; cout << (mid / 2) << " "; REP(i, mid) { if (i + 1 == mid / 2) continue; cout << i + 1 << " "; } cout << endl; return 0; }