import java.util.*;
public class ElevatorTrouble {
public static void main(String[] args) {
IO io = new IO();
int f = io.nextInt();
int s = io.nextInt();
int g = io.nextInt();
int u = io.nextInt();
int d = io.nextInt();
int[] dist = new int[f + 1];
Arrays.fill(dist, -1);
ArrayDeque<Integer> Q = new ArrayDeque<>();
dist[s] = 0;
Q.push(s);
while(!Q.isEmpty()) {
int v = Q.remove();
int x = v - d;
int y = v + u;
if(x >= 1 && dist[x] == -1) {
dist[x] = dist[v] + 1;
Q.push(x);
}
if(y <= f && dist[y] == -1) {
dist[y] = dist[v] + 1;
Q.push(y);
}
}
if(dist[g] == -1) {
io.println("use the stairs");
} else {
io.println(dist[g]);
}
io.close();
}
}