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

int main(){
  int64_t N; vector<int64_t> A(5);
  cin >> N;

  int64_t m =1e16; 
  for(int i=0; i<5; i++){
    cin >> A[i]; m = min(m, A[i]);
  }

  cout << 4 + (N+m-1)/m << endl;
}