#include <iostream>
using namespace std;
long long N, A, B; int C, D;
int main() {
	cin >> N >> C >> D >> A >> B;
	long long E = A ? (A * 100 - 1) / C + 1 : 0;
	long long F = B ? (B * 100 - 1) / D + 1 : 0;
	if (N < E + F) cout << -1 << endl;
	else cout << N - E - F << endl;
	return 0;
}