#include using namespace std; typedef long long ll; #define int long long typedef vector vi; typedef vector vll; typedef vector vs; typedef vector vc; #define f first #define s second #define pb push_back #define po pop_back #define foo(i, a, b) for (int i = a; i < b; i++) #define rfoo(i, a, b) for (int i = a; i >= b; i--) #define input(v) \ for (auto &x : v) \ cin >> x #define print(v) \ for (auto x : v) \ cout << x << " "; \ cout << '\n' #define all(x) (x).begin(), (x).end() #define YES cout << "YES" << std::endl; #define NO cout << "NO" << std::endl; const int MOD = 1e9 + 7; ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; } ll power(ll a, ll b) { ll res = 1; while (b) { if (b & 1) res *= a; a *= a; b >>= 1; } return res; } ll modexp(ll a, ll b, ll mod) { ll res = 1; a %= mod; while (b) { if (b & 1) res = res * a % mod; a = a * a % mod; b >>= 1; } return res; } int digitCount(ll n, int base = 10) { return n ? (int)(log(n) / log(base)) + 1 : 1; } bool isprime(int n) { if (n < 2) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; } void sieve(int n, vector &isPrime) { isPrime.assign(n + 1, true); isPrime[0] = isPrime[1] = false; for (int i = 2; i * i <= n; ++i) if (isPrime[i]) for (int j = i * i; j <= n; j += i) isPrime[j] = false; } vi factors(int n) { vi res; for (int i = 1; i * i <= n; i++) { if (n % i == 0) { res.pb(i); if (i != n / i) res.pb(n / i); } } sort(all(res)); return res; } int getbit(long long n, int b) { return (n >> (b - 1)) & 1; } long long setbit(long long n, int b) { return n | (1LL << (b - 1)); } long long resetbit(long long n, int b) { return n & ~(1LL << (b - 1)); } long long togglebit(long long n, int b) { return n ^ (1LL << (b - 1)); } bool ispoftwo(long long n) { return n > 0 && !(n & (n - 1)); } int countSetBits(long long n) { return __builtin_popcountll(n); } long long lastKbits(long long n, int k) { return n & ((1LL << k) - 1); } long long clearRightmostBit(long long n) { return n & (n - 1); } long long rightmostBit(long long n) { return n & -n; } int rightmostBitPos(long long n) { return n == 0 ? -1 : __builtin_ctzll(n) + 1; } int highestBitPos(long long n) { return n == 0 ? -1 : 63 - __builtin_clzll(n); } bool isDivisibleByPowerOf2(ll n, int k) { ll powerOf2 = 1 << k; return (n & (powerOf2 - 1)) == 0; } #define lb(v, x) (lower_bound(all(v), x) - (v).begin()) #define ub(v, x) (upper_bound(all(v), x) - (v).begin()) #define count_occ(v, x) (ub(v, x) - lb(v, x)) #define fastio \ ios::sync_with_stdio(false); \ cin.tie(nullptr); \ cout.tie(nullptr) signed main() { fastio; // int t=1; // cin>>t; int i = 1; int n = 0; while (1) { cin >> n; if (n != i) { cout << i << endl; break; } i++; } }