#include <bits/stdc++.h>
int main() { int N; std::cin >> N; int result[400], length = 1; memset(result, 0, sizeof(result)); result[0] = 1;
for (int i = 1; i <= N; ++i) { int doPlusOne = 0; for (int j = 0; j < length; ++j) { result[j] = result[j] * 2 + doPlusOne; doPlusOne = result[j] / 10; result[j] = result[j] % 10; if (doPlusOne != 0 && j + 1 == length) { length++; } }
}
for (int i = 0; i < length; ++i) { std::cout << result[length - i - 1]; } return 0; }
|