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

// ----------- define --------------
#define int long long
#define vi vector<int>
#define vc vector<char>
#define ii pair<int,int>
#define fi first
#define sc second
#define all(x) (x).begin(),(x).end()
#define get_bit(x, k) ((x >> k) & 1)
// ---------------------------------

void MAIN() {
  int n; cin >> n;
  int mi = n;
  for (int i = 1; i <= 5; i++) {
    int t; cin >> t;
    mi = min(mi, t);
  }
  cout << (n + mi - 1) / mi + 4 << '\n';
}

signed main() {
  ios::sync_with_stdio(0); cin.tie(0);
  int T = 1;
  // cin >> T;
  while (T--) MAIN();
}

#include <iostream>
#include <stdlib.h>
#include <iomanip>
using namespace std;
 
int main() {
    int n;
    cin >> n;
    
    int num[n-1];

    for (int i = 0; i < n; ++i)
    {
        cin >> num[i];
    }

    for (int i = 0; i < n; ++i)
    {
        if (i) cout << " ";
        cout << num[n-1-i];
    }
    cout << endl;
}