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.io.*;
import java.text.DecimalFormat;
import java.util.*;
public class Template {
	//static int cnt=0;
static Scanner sc=new Scanner(System.in);
	static ArrayList<Integer> v=new ArrayList();;
	static int max=0;
	static String f3="";
	//static long n=0;
	static BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); 
	
	public static void main (String[] args) throws java.lang.Exception{
int l,d,v,g,r;
l=sc.nextInt();
d=sc.nextInt();
v=sc.nextInt();
g=sc.nextInt();
r=sc.nextInt();

double tlight=d/(v*1.0);
if(tlight<g) {
	System.out.println(l/(v*1.0));
}
else if(tlight>=g && tlight<(g+r)) {
	System.out.println((double)(g+r)+(l-d)/(v*1.0));
}

else {
	double temp=tlight;
	tlight=tlight%((g+r)*1.0);
	if(tlight<(double)g) {
		System.out.println(l/(v*1.0));
	}
	else if(tlight>=(double)g && tlight<(double)(g+r)) {
		int q=(int) (temp/((g+r)));
		
		System.out.println((double)(q+1)*(g+r)+(l-d)/(v*1.0));
	}
}
	}
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	public static int[][] matrixInp(int n,int m) {
		int[][] arr=new int[n][m];
		for(int i=0;i<n;i++) {
			for(int j=0;j<m;j++) {
				arr[i][j]=sc.nextInt();
			}
		}
		return arr;
	}
	
	public static int reduceFraction(int a, int b)
	{
		int aa=a;
		if(a==0 || b==0)
			return Math.max(a, b);
		else {
			for(int i=2;i<=Math.min(a, b);i++) {
				if(a%i==0 && b%i==0) {
					a=a/i;
					b=b/i;
					i--;
				}
			}
			
			
		}
		
		return aa/a;
	}
	
	public static long sumDigits(long x) {
		String s=String.valueOf(x);
		//System.out.println(s+" "+sx+" "+x);
		long sum=0;
		for(int i=0;i<s.length();i++) {
			sum+=Long.parseLong(s.substring(i,i+1));
		}
		return sum;
	}
	
	
	public static int[] primeFactofNumb(int num) {
		int[] factors=new int[num+1];
		for(int j=2;j<=Math.sqrt(num);j++) {
			if(num%j==0) {
				factors[j]++;
			}
			while(num%j==0) {
				num=num/j;
			}
			
		}
		
		if(num>1)
			factors[num]++;
		return factors;
	}
	
	
	
	
	public static double nCr(long n, long r){ 
		if(n<r) {
			return 0;
		}
		long rfact=1, nfact=1, nrfact=1,temp1 = n-r ,temp2 = r; 
		if(r>n-r) 
		{ 
			temp1 =r; 
			temp2 =n-r; 
		} 
		for(long i=1;i<=n;i++) 
		{ 
			if(i<=temp2) 
			{ 
				rfact *= i; 
				nrfact *= i; 
			} 
			else if(i<=temp1) 
			{ 
				nrfact *= i; 
			} 
			nfact *= i; 
		} 
		return nfact/(double)(rfact*nrfact); 
	}
		
	
		
	

	
	
	

		
	
	
	
	
static long gcd(long a,long b) {
		
	
		if(b==0) {
		return a;
		}
			
		
	return gcd(b,a%b);
	
	}
	
	
	
	
	
	public static int s2i(String s) {
		return Integer.parseInt(s);
	}
	

	
	
	public static int LeastIntFn(int a,int b) {
		if((b%a)==0) {
			return (int)b/a;
		}
		return (int)(b/a)+1;
	}
	
	
	
	public static ArrayList<Long> arrInpLong(int n){
		ArrayList<Long> arr=new ArrayList();
		for(int i=0;i<n;i++) {
		arr.add(sc.nextLong());	
		}
		return arr;
	}
	public static ArrayList<String> arrInpStr(int n){
		ArrayList<String> arr=new ArrayList();
		for(int i=0;i<n;i++) {
					arr.add(sc.nextLine());	
		}
		return arr;
	}
	
	public static ArrayList<Integer> arrInpInt(int n){
		ArrayList<Integer> arr=new ArrayList();
		for(int i=0;i<n;i++) {
			int k=sc.nextInt();
			if(k>max)
				max=k;
		arr.add(k);	
		}
		return arr;
	}
	
	
	public static void printArrInt(ArrayList<Integer> arr) {
		for(int i=0;i<arr.size();i++) {
			System.out.print(arr.get(i)+" ");
	}	
		}
	
	
	public static int min(int a,int b,int c) {
		int min1=Math.min(a, b);
		return Math.min(min1,c);
	}
}