#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;

vector<int> cards;

int func(int s, int maxPos) {
	int mini = ceil(float(s) / cards[maxPos]);
	return mini;
}

int main() {
	int s, n;
	cin >> s >> n;
	for (int i = 0; i < n; i++) {
		int a;
		cin >> a;
		cards.push_back(a);
	}
	sort(cards.begin(), cards.end(), greater<int>());

	cout << func(s, 0) << endl;

	return 0;
}