#include <iostream>
#include <algorithm>
#include <math.h>

int main() {

	float p, q, r, L, R;
	std::cin >> p >> q >> r >> L >> R;
	float N = R - L + 1;
	float p_ = ceil(p/N);
	float q_ = ceil(q/N);
	float r_ = ceil(r/N);
	float max = p_;
	if (q_ > max) { max = q_; }
	if (r_ > max) { max = r_; }
	
	std::cout << max << std::endl;

	return 0;
}