Problem: A car moves from point A to point B at speed v meters per second. The action takes place on the X-axis. At the distance d meters from A there are traffic lights. Starting from time 0, for the first g seconds the green light is on, then for the following r seconds the red light is on, then again the green light is on for the g seconds, and so on.

The car can be instantly accelerated from 0 to v and vice versa, can instantly slow down from the v to 0. Consider that it passes the traffic lights at the green light instantly. If the car approaches the traffic lights at the moment when the red light has just turned on, it doesn't have time to pass it. But if it approaches the traffic lights at the moment when the green light has just turned on, it can move. The car leaves point A at the time 0.

What is the minimum time for the car to get from point A to point B without breaking the traffic rules?

Input

The first line contains integers l, d, v, g, r (1 ≤ l, d, v, g, r ≤ 1000, d < l) — the distance between A and B (in meters), the distance from A to the traffic lights, car's speed, the duration of green light and the duration of red light.

Output

Output a single number — the minimum time that the car needs to get from point A to point B. Your output must have relative or absolute error less than 10 - 6.

Examples

Input

2 1 3 4 5


Output

0.66666667


Input

5 4 3 1 1


Output

2.33333333

Solution (in JAVA):

Solution:
import java.awt.List;
import java.io.BufferedReader;

import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.math.RoundingMode;
import java.util.*;

public class Watermelon {
	public static void main(String[] args) throws IOException{
		Main m=new Main();
		m.solve();
	}
	}
class Main{
	static int[] temp=new int[100];
	 BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));

	   
	    StringTokenizer stringTokenizer;

	     String next() throws IOException {
	        while (stringTokenizer == null || !stringTokenizer.hasMoreTokens()) {
	            stringTokenizer = new StringTokenizer(reader.readLine());
	        }
	        return stringTokenizer.nextToken();
	    }

	    int nextInt() throws IOException {
	        return Integer.parseInt(next());
	    }

	    long nextLong() throws IOException {
	        return Long.parseLong(next());
	    }
	    void solve() throws IOException  {
	    	double l=this.nextInt();
	    	double d=this.nextInt();
	    	double v=this.nextInt();
	    	double g=this.nextInt();
	    	double r=this.nextInt();
	    	double t=d/v;
	    //	System.out.println(t);
	    	int x=(int)g;
	    	int y=(int)r;
	    	ArrayList<Integer> list=new ArrayList<>();
	  //  	 if(t<g){
	   // 		 t+=(l-d)/v;
	   // 	 }
	   // 	 if(t<g){
	   // 		 t=((l)/v);
	    	//	 System.out.println(t);
	   // 		 System.exit(0);
	    //	 }
	    	double sum=0;
	    	int i=0;
	    	int flag=0;
	    //	System.out.println(t);
	    	while(sum<=t){
	    		if(i%2==0)
	    		{flag=1;sum+=g;}
	    		else
	    			{flag=2;sum+=r;}
	    		i++;
	    	}
	    //	System.out.println(t+" sum"+sum+" flag"+flag);
	    	if(flag==2){
	    		t+=(sum-t);
	    	}
	   // 	System.out.println(t);
	    	t+=(l-d)/v;
	    	System.out.println(t);
	    }
	  
	private static int gcd(int a, int b)
	{
	    while (b > 0)
	    {
	    	int temp = b;
	        b = a % b; // % is remainder
	        a = temp;
	    }
	    return a;
	}
	private static int lcm(int a, int b)
	{
	    return a * (b / gcd(a, b));
	}
	static int[] toFractionPos(int x,int y){
		int a=gcd(x,y);
		int[] arr={x/a,y/a};
		//display(arr);
		return arr;
	}
   
	static void display(char[][] arr){
		for(int i=0;i<arr.length;i++){
			for(int j=0;j<arr[i].length;j++){
				System.out.print(arr[i][j]+" ");
		}
			System.out.println();
		}
		System.out.println();
	}

	 static void display(String[] arr){
			for(int i=0;i<arr.length;i++){
				
			}	
			System.out.println();
		
	 }
	 static void display(int[] arr){
		 for(int i=0;i<arr.length;i++)
				System.out.print(arr[i]+" ");
		System.out.println();
		 }
		 static void display(double[] arr){
		 	   for(int i=0;i<arr.length;i++){
		 		   System.out.print(arr[i]+" ");
		 	   }
		 	   System.out.println();
	    }
	 static void display(char[] arr){
		// System.out.println();
		 int t=0;
			for(int i=0;i<arr.length;i++){
				if(arr[i]!='0'){t=i;break;}
			}	
			while(t!=arr.length){
				System.out.print(arr[t]);
				t++;
			}
			System.out.println();
		
		  }
	 static String str(char[] carr){
		 String str="";
		 for(int i=0;i<carr.length;i++){
			    str=str+carr[i];
			}
		 return str;
	 }
}
class  Count {
    char i;
    int c;
    Count(char i,int c){
    	this.i=i;this.c=c;
    }
    void display(){
    	System.out.println(i+" "+c);
    }
    
    /*	@Override
	public int compareTo(Object o) {
		// TODO Auto-generated method stub
		Count c=(Count)o;
		if(this.i>c.i)
			return 1;
		else if(this.i<c.i)
			return -1;
		else return 0;
	}
	*/
}
class  Count1 implements Comparable {
    int i;
    int j;
    Count1(int i,int j){
        this.j=j;
        this.i=i;
    }
    void display(){
    	System.out.println(i+" "+j);
    }
    
    	@Override
	public int compareTo(Object o) {
		// TODO Auto-generated method stub
		Count1 c=(Count1)o;
		if(j>c.j)
			return 1;
		else if(j<c.j)
			return -1;
		else
			return 0;
	}
	
}