#include <iostream>
#include<vector>

using namespace std;

int main()
{
	int N; // dementori
	cin >> N;
	vector<long long> x;
	int c, j = 0; // c sever j jug
	for (int i = 0; i < N; i++) {
		cin >> x[i];
		if (x[i] > N) {
			cout << N;	
	}

	return 0;
}