#include <bits/stdc++.h>

using namespace std;

typedef long long ll;

const int sz = (1 << 20) - 1;

struct MyHash {
	pair<int, int> T[sz + 7];
	
	MyHash() { fill(T, T + sz + 7, make_pair(-1, 0)); }
	
	int& operator [](int x) {
		int h = (x & sz);
		for (; T[h].first != -1; h = (h + 1) & sz) {
			if (T[h].first == x) return T[h].second;
		}
		T[h].first = x;
		return T[h].second;
	}
} T;

int main() {
	cout << T[1e9] << "\n";
	T[1e9]++;
	cout << T[1e9] << "\n";
	return 0;
}