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

#define rep(i,n) for(int (i)=0;(i)<(n);(i)++)
typedef long long ll;

int main(){
  ll n;
  cin >> n;
  vector<ll> p(5);
  rep(i,5) cin >> p.at(i);

  ll mi = p.at(0);
  rep(i,5) mi = min(mi, p.at(i));

  ll ans = ceil(double(n/double(mi))) + 4;
  cout << ans;
}
#include <bits/stdc++.h>
int n, a[205];
int main()
{
 	scanf("%d", &n);
  	for(int i=1; i<=2*n; i++) scanf("%d", a+i);
  	std::sort(a+1, a+2*n+1);
  	int ans = 0;
  	for(int i=1; i<=2*n; i+=2) ans += a[i];
  	printf("%d\n", ans);
}