#include <iostream>
using namespace std;
int main() {
	int l,a,b,c,d,e;
	cin>>l>>a>>b>>c>>d;
	if(a/c<b/d){
		e=b/d;
		if(b%d>0)
			e=e+1;
	}
	else{
		e=a/c;
		if(a%c>0)
			e=e+1;
	}
	cout<<l-e<<endl;
	return 0;
}