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

int main() {
  long long n,a,b,c,d,e;
  cin>>n;
  cin >>a>>b>>c>>d>>e;
  cout<<fixed<<setprecision(0)<<(n-1)/min(a,min(b,min(c,min(d,e))))+5<<endl;
  return 0;
}