#include <iostream>
using namespace std;
int main() {
double h, u, d, f;
while (cin >> h >> u >> d >> f) {
if (h == 0)break;
f = u * f / 100;
double day = 0,sum=0;
bool op = false;
for (;;) {
day++;
sum += u;
if (sum >h) {
op = true;
break;
}
sum -= d;
if (sum <0)break;
if (u > f)u -= f;
else u = 0;
}
if (op) cout << "success on day " << day << "\n";
else cout << "failure on day " << day << "\n";
}
}