#include<bits/stdc++.h>
using namespace std;
#define LL long long

int main(){
	// sengen
	LL n,a[5];
	// nyuryoku
	cin >> n >> a[0] >> a[1] >> a[2] >> a[3] >> a[4];
	// keisan
	LL ans = 4;
	LL plus = 0;
	if(n%a[0] == 0){
		plus = n/a[0];
	}else{
		plus = n/a[0] + 1;
	}
	for(int i=1;i<5;i++){
		if(n%a[i] == 0){
			plus = max(plus,n/a[i]);
		}else{
			plus = max(plus,n/a[i] + 1);
		}
	}
	// syutsuryoku
	cout << plus + ans << endl;
}
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rng(i, a, b) for (int i = int(a); i < int(b); i++)
#define rep(i, b) rng(i, 0, b)
#define gnr(i, a, b) for (int i = int(b) - 1; i >= int(a); i--)
#define per(i, b) gnr(i, 0, b)
#define bg begin()
#define ed end()
#define all(x) x.bg, x.ed
#define vi vector<int>
template <class t, class u>
bool chmax(t &a, u b)
{
    if (a < b)
    {
        a = b;
        return true;
    }
    return false;
}
template <class t, class u>
bool chmin(t &a, u b)
{
    if (b < a)
    {
        a = b;
        return true;
    }
    return false;
}
signed main()
{
    ll n;
    cin >> n;
    vector<ll> a;
    rep(i, 5)
    {
        ll b;
        cin >> b;
        a.push_back(b);
    }
    sort(all(a));
    cout << (n + a[0] - 1LL) / a[0] + 4LL << endl;
    return 0;
}