#include <bits/stdc++.h>
//#include <atcoder/all>
#define ll long long int
#define MOD 1000000007
#define P pair<ll,ll>
#define INF 1000000000000000000

//using namespace atcoder;
using namespace std;

int main(void){
  ll n;
  cin >> n;
  
  vector<ll> a(5);
  for (int i = 0; i < 5; i++){
    cin >> a[i];
  }
  sort(a.begin(), a.end());
  
  cout << (n + a[0] - 1)/a[0] + 4 << endl;
      


  return 0;
}

#include <bits/stdc++.h>
#define rep(i,n) for(int i = 0; i < (n); i++)
using namespace std;
using ll = long long;
using P = pair<int,int>;

int main(){
    int n;
    cin >> n;
    map<int,int> m;
    rep(i,n){
        int a;
        cin >> a;
        m[a]++;
    }
    for(auto p : m){
        if(p.second > 1){
            cout << "NO" << endl;
            return 0;
        }
    }
    cout << "YES" << endl;
}