#include <bits/stdc++.h>
using namespace std;
long long n,a[5];
int main(){
	cin>>n>>a[0]>>a[1]>>a[2]>>a[3]>>a[4];
	sort(a,a+5);
	long long b=(n/a[0]);
	if(((n%a[0])==0)&&(b!=0))b--;
	cout<<(5+b)<<endl;
}
