#include<bits/stdc++.h>
using namespace std;
using ll=int64_t;

int main(){
  vector<ll>a(6);
  for(int i=0;i<6;i++){
    cin>>a.at(i);
  }
  ll min=a.at(0);
  for(int i=1;i<6;i++){
    if(a.at(i)<a.at(i-1)&&min>a.at(i)){
      min=a.at(i);
    }
  }
  ll ans=(a.at(0)-min)/min+5;
  if((a.at(0)-min)%min!=0)ans++;
  cout <<ans<<endl;
}
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const long long INF = 1LL << 60;

int main(){
    ll N;
    cin >> N;
    vector<ll> V(5);
    ll min_v = 1e16;
    for(int i=0; i<5; i++) {
        cin >> V[i];
        min_v = min(min_v, V[i]);
    }
    ll X = N/min_v;
    if(N % min_v == 0) {
        X--;
    }
    cout << 5 + (ll)(X) << endl;
}