usingnamespacestd; intfunc0_s(int s, int m) { return s * 2; } intfunc0_m(int s, int m) { return s; }
intfunc1_s(int s, int m) { return s + m; } intfunc1_m(int s, int m) { return m; }
intmain() { int n; cin >> n;
deque<int> layer_s_queue; deque<int> layer_m_queue; deque<int> layer_queue; int s = 1; int m = s; layer_s_queue.push_back(s); layer_m_queue.push_back(m); layer_queue.push_back(0); int min_layer = 0;
while(!layer_s_queue.empty()) { int temp_s = layer_s_queue.front(); layer_s_queue.pop_front(); int temp_m = layer_m_queue.front(); layer_m_queue.pop_front(); int temp_layer = layer_queue.front(); layer_queue.pop_front();