#include <iostream>
#include <fstream>

using namespace std;

long long n, a, b, c, d, e;

int main()
{
    cin >> n >> a >> b >> c >> d >> e;
    cout << (n - 1) / min(a, min(b, min(c, min(d, e)))) + 5 << endl;
}