codeparrot/codecomplex huggingface dataset:
// Problem: 84_A. Toy Army
// Time complexity: constant
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.List;
import java.util.Set;
import java.util.StringTokenizer;

/**
 * @author abashkin
 */
public class Solution implements Runnable {

    public static void main(String[] args) {
        new Thread(new Solution()).start();
    }

    public void run() {
        try{
            br = new BufferedReader(new InputStreamReader(System.in));
            pw = new PrintWriter(new OutputStreamWriter(System.out));
            solve();
            pw.close();
        }
        catch (Exception e) {
            e.printStackTrace();
            System.exit(1);
        }
    }

    private void solve() throws Exception {
        int n = nextInt();
        pw.print(n + n / 2);
    }

    private BufferedReader br;
    private PrintWriter pw;
    private StringTokenizer tok;

    private String next() throws Exception {
        while (tok == null || !tok.hasMoreElements()) tok = new StringTokenizer(br.readLine());
        return tok.nextToken();
    }

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



}
// Problem: 84_A. Toy Army
// Time complexity: constant
import java.io.*;
import java.util.*;

public class Main {

    public void solve() throws IOException {
        int n = nextInt();
        output.println(n / 2 * 3);
    }

    public void run() throws IOException {
        input = new BufferedReader(new InputStreamReader(System.in));
        output = new PrintWriter(System.out);
        solve();
        input.close();
        output.close();
    }

    BufferedReader input;
    PrintWriter output;
    StringTokenizer tok;

    String nextToken() throws IOException {
        while(tok == null || !tok.hasMoreTokens())
            tok = new StringTokenizer(input.readLine());

        return tok.nextToken();
    }

    int nextInt() throws IOException {
        return Integer.valueOf(nextToken());
    }

    long nextLong() throws IOException {
        return Long.valueOf(nextToken());
    }

    double nextDouble() throws IOException {
        return Double.valueOf(nextToken());
    }

    public static void main(String[] args) throws IOException {
        new Main().run();
    }
}
// Problem: 84_A. Toy Army
// Time complexity: constant
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        System.out.println(n/2*3);
    }
}
// Problem: 84_A. Toy Army
// Time complexity: constant
import java.util.*;
public class Main {

    public static void main(String[] args) {
        Scanner read = new Scanner(System.in);
        int n = read.nextInt();
        System.out.println(n*3/2);
    }
}
// Problem: 84_A. Toy Army
// Time complexity: constant
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        System.out.println(n + n / 2);
    }
}
// Problem: 84_A. Toy Army
// Time complexity: constant
import java.io.*;
import java.util.*;

public class Main {

    StreamTokenizer in;
    PrintWriter out;

    public static void main(String[] args) throws Exception {
        new Main().run();
    }

    public void run() throws Exception {
        in = new StreamTokenizer (new BufferedReader(new InputStreamReader(System.in)));
        out = new PrintWriter(new OutputStreamWriter(System.out));
        solve();
        out.flush();
    }
    
    int nextInt() throws Exception {
        in.nextToken();
        return (int) in.nval;
    }


    public void solve() throws Exception {
        int n=nextInt();
        long ans=0;
        for (int i=0;i<n;i+=2)
            ans+=3;
        out.println(ans);
    }
}
// Problem: 84_A. Toy Army
// Time complexity: constant
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.io.StreamTokenizer;

public class A {
    private static StreamTokenizer in;
    private static PrintWriter out;
    
    private static int nextInt() throws Exception{
        in.nextToken();
        return (int)in.nval;
    }
    
    private static String nextString() throws Exception{
        in.nextToken();
        return in.sval;
    }
    
    static{
        in = new StreamTokenizer(new BufferedReader(new InputStreamReader(System.in)));
        out = new PrintWriter(System.out);
    }
    
    public static void main(String[] args)throws Exception{
        int n = nextInt();
        
        out.println(n*3/2);
        
        out.flush();
    }
}
// Problem: 84_A. Toy Army
// Time complexity: constant
import java.util.Scanner;

public class A {

    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        int n = s.nextInt();
        
        System.out.println(n/2*3);
    }
}
// Problem: 84_A. Toy Army
// Time complexity: constant
import java.util.Scanner;


public class A_Toy_Army {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner entrada = new Scanner(System.in);
		while(entrada.hasNextInt())
		{
			int n = entrada.nextInt();
			System.out.println(n+(n/2));
		}
	}

}
// Problem: 84_A. Toy Army
// Time complexity: constant
import java.io.*;
import java.util.*;

public class A{     
        
        private BufferedReader in;  
        private StringTokenizer st;
        
        void solve() throws IOException{
            
            int n = nextInt();
            System.out.println(3 * n/2);
        }
            

        A() throws IOException {
            in = new BufferedReader(new InputStreamReader(System.in));          
            eat("");
            solve();            
        }

        private void eat(String str) {
            st = new StringTokenizer(str);
        }

        String next() throws IOException {
            while (!st.hasMoreTokens()) {
                String line = in.readLine();
                if (line == null) {
                    return null;
                }
                eat(line);
            }
            return st.nextToken();
        }

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

        long nextLong() throws IOException {
            return Long.parseLong(next());
        }

        double nextDouble() throws IOException {
            return Double.parseDouble(next());
        }

        public static void main(String[] args) throws IOException {
            new A();
        }

        int gcd(int a,int b){
            if(b>a) return gcd(b,a);
            if(b==0) return a;
            return gcd(b,a%b);
        }

}
// Problem: 84_A. Toy Army
// Time complexity: constant
import java.util.Scanner;
public class Main {
    public static void main(String[] args) {
        Scanner in=new Scanner(System.in);
        int n,b = 0;
        n=in.nextInt();
        if (n%2==0) {
            b=n+n/2;
            System.out.println(b);
        }
    }
}
// Problem: 84_A. Toy Army
// Time complexity: constant
import java.util.Scanner;


public class Main {

    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        
        int n = input.nextInt();
        
        System.out.println(n * 6 / 4);
    }
    
}
// Problem: 84_A. Toy Army
// Time complexity: constant
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;


public class ToyArmy {

	/**
	 * @param args
	 * @throws IOException 
	 * @throws NumberFormatException 
	 */
	public static void main(String[] args) throws NumberFormatException, IOException 
	{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int n = Integer.parseInt(br.readLine());
		System.out.println(n / 2 * 3);
	}

}
// Problem: 84_A. Toy Army
// Time complexity: constant
import java.util.Scanner;


public class p84a {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        
        System.out.println((n/2)*3);
        
    }
}
// Problem: 84_A. Toy Army
// Time complexity: constant
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.LinkedList;
import java.util.Scanner;
import java.util.Stack;

public class sample {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();       
        System.out.println(n+n/2);
    }
}
// Problem: 84_A. Toy Army
// Time complexity: constant
import java.io.PrintWriter;
import java.util.Locale;
import java.util.Scanner;

public class A {
	public static void main (String[] args){
		Scanner in = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);
		
		int n = in.nextInt();
		
		out.printf(Locale.US, "%d", n/2*3);
		
		out.close();
	}
}
// Problem: 84_A. Toy Army
// Time complexity: constant
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author Saransh
 */
import java.io.*;
import java.util.*;
import java.math.*;
import java.lang.*;


public class Main {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
        try
        {
            Parserdoubt pd=new Parserdoubt(System.in);
            //BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
            int n=pd.nextInt();
            PrintWriter pw=new PrintWriter(System.out);
            pw.println((n*3)/2);
            pw.flush();
        }
        catch(Exception e)
        {}

    }

}


class Parserdoubt
    {
       final private int BUFFER_SIZE = 1 << 17;

       private DataInputStream din;
       private byte[] buffer;
       private int bufferPointer, bytesRead;

       public Parserdoubt(InputStream in)
       {
          din = new DataInputStream(in);
          buffer = new byte[BUFFER_SIZE];
          bufferPointer = bytesRead = 0;
       }
       public String nextString() throws Exception
       {
           StringBuffer sb=new StringBuffer("");
           byte c = read();
           while (c <= ' ') c = read();
           do
           {
               sb.append((char)c);
               c=read();
           }while(c>' ');
           return sb.toString();
       }
       public char nextChar() throws Exception
       {
           byte c=read();
           while(c<=' ') c= read();
           return (char)c;
       }
       public int nextInt() throws Exception
       {
          int ret = 0;
          byte c = read();
          while (c <= ' ') c = read();
          boolean neg = c == '-';
          if (neg) c = read();
          do
          {
              ret = ret * 10 + c - '0';
             c = read();
          } while (c > ' ');
          if (neg) return -ret;
          return ret;
       }
       public long nextLong() throws Exception
       {
          long ret = 0;
          byte c = read();
          while (c <= ' ') c = read();
          boolean neg = c == '-';
          if (neg) c = read();
          do
          {
              ret = ret * 10 + c - '0';
             c = read();
          } while (c > ' ');
          if (neg) return -ret;
          return ret;
       }
       private void fillBuffer() throws Exception
       {
          bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);
          if (bytesRead == -1) buffer[0] = -1;
       }

       private byte read() throws Exception
       {
          if (bufferPointer == bytesRead) fillBuffer();
          return buffer[bufferPointer++];
       }
    }
// Problem: 84_A. Toy Army
// Time complexity: constant
import java.io.IOException;
import java.util.Scanner;


public class A {
	public static void main(String args[]) throws IOException {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		System.out.println((2*n) - (n/2));
		
	}

}
// Problem: 84_A. Toy Army
// Time complexity: constant


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

/**
 *
 * @author Mostafa
 */
public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        int n = Integer.parseInt(in.readLine());
        System.out.println((n/2) *3);
    }

}
// Problem: 84_A. Toy Army
// Time complexity: constant
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

/**
 * May 13, 2011 
 * @author parisel
 */
public class ToyArmy {
    int N;
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    String[] tok;
    String s;

    private String[] getTok() throws IOException {return br.readLine().split(" ");}
    private int getInt() throws IOException {return Integer.valueOf(br.readLine());}
    private int[] getInt(int N) throws IOException {
        int[] data= new int[N]; tok= br.readLine().split(" ");
        for (int i=0; i<N; i++) data[i]= Integer.valueOf(tok[i]);
        return data;
    }

    public void solve() throws IOException {
        int i=0, j=0;
        N= getInt();

        long kill= (3*N)/2;

        System.out.printf("%d\n", kill);

    }


    public static void main(String[] args) throws IOException {
        new ToyArmy().solve();
    }
}
// Problem: 5_D. Follow Traffic Rules
// Time complexity: constant
import java.util.Scanner;
import java.io.OutputStream;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Locale;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		Scanner in = new Scanner(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		TaskD solver = new TaskD();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskD {
    public void solve(int testNumber, Scanner in, PrintWriter out) {
        String[] str = in.nextLine().split(" ");
        int a = Integer.parseInt(str[0]);
        int v = Integer.parseInt(str[1]);
        str = in.nextLine().split(" ");
        int l = Integer.parseInt(str[0]);
        int d = Integer.parseInt(str[1]);
        int w = Integer.parseInt(str[2]);


        double minTime = 0.;
        if (w >= v) {
            minTime = getTimeAfterSign(0, v, l, a);
            out.format(Locale.US, "%.6f", minTime);
            return;
        }
        double whenGetSpeedWPath = (w * w) / (2. * a);
        if (whenGetSpeedWPath >= d) {
            double time = Math.sqrt((2.0 * d) / a);
            minTime = time + getTimeAfterSign(a * time, v, l - d, a);
        } else {
            double stopPath = (v * v - w * w) / (2. * a);
            double vMaxPath = (v * v) / (2. * a);
            if (stopPath + vMaxPath > d) {
//                double topSpeed = (Math.sqrt(2. * a * d) + w) / 2;
//                minTime = (topSpeed / a) + (topSpeed - w) / a + getTimeAfterSign(w, v, l - d, a);
                double topSpeed = Math.sqrt((2. * a * d + w * w) / 2);
                minTime = (2. * topSpeed - w) / a + getTimeAfterSign(w, v, l - d, a);
            } else {
                double stopTime = (v - w) / (a + 0.);
                double getMaxTime = v / (a + 0.);
                double maxTime = (d - (stopPath + vMaxPath)) / v;
                minTime = stopTime + getMaxTime + maxTime + getTimeAfterSign(w, v, l - d, a);
            }
        }
        out.format(Locale.US, "%.6f", minTime);

    }

    double getTimeAfterSign(double startSpeed, double maxSpeed, double path, int a) {
        double maxSpeedTime = (maxSpeed - startSpeed) / a;
        double maxSpeedPath = startSpeed * maxSpeedTime + (a * maxSpeedTime * maxSpeedTime) / 2;
        if (maxSpeedPath > path) {
            return (-startSpeed + Math.sqrt(startSpeed * startSpeed + 2 * a * path)) / a;
        } else {
            return maxSpeedTime + (path - maxSpeedPath) / maxSpeed;
        }
    }
}
// Problem: 5_D. Follow Traffic Rules
// Time complexity: constant
import java.util.Scanner;

public class Main{
	static final double eps = 1e-10;
	public static void main(String []args){
		Scanner cin = new Scanner(System.in);
		double a,v;
		double l,d,w;
		double time;
		
		a = cin.nextDouble();
		v = cin.nextDouble();
		
		l = cin.nextDouble();
		d = cin.nextDouble();
		w = cin.nextDouble();
		
		if(v < w + eps)
		{
			double t1 = v / a;
			double len_bond = (v * v) / (2 * a);
			if(len_bond + eps > l)
			{
				time = Math.sqrt(2 * l / a);
			}
			else
			{
				double t2 = (l - len_bond) / v;
				time = t1 + t2;
			}
			System.out.println(time);
		}
		else
		{
			double len_bondv =  (v * v) / (2 * a);
			double len_bondw = (w * w) / (2 * a);
			if(len_bondw + eps > d)
			{
				if(len_bondv + eps > l)
					time = Math.sqrt(2 * l / a);
				else{
					double t1 = v / a;
					double t2 = (l - len_bondv) / v;
					time = t1 + t2;
				}
			}
			else
			{
				double len_bonds = (v * v - w * w) / (2 * a);
				
				if(len_bondv + len_bonds < d + eps)
					time = v / a + (d - len_bondv - len_bonds) / v + (v - w) / a;
				else
				{
					double f = Math.sqrt(d * a + w * w / 2);
					time = f / a + (f - w) / a;
				}
				if (len_bonds + eps > l - d) {
					double lv = Math.sqrt((l - d) * 2 * a + w * w);
					time += (lv - w) / a;
				} else {
					time += (v - w) / a + (l - d - len_bonds) / v;
				}
			}
			
			System.out.println(time);
		}
	}
}
// Problem: 5_D. Follow Traffic Rules
// Time complexity: constant
import java.io.*;
import java.math.*;
import java.util.*;

public class Main
{
    public static void main(String args[]) throws IOException
    {
        new Main().run();
    }
    StreamTokenizer in;
    PrintWriter out;
    public void run() throws IOException
    {
        in =new StreamTokenizer(new BufferedReader(new InputStreamReader(System.in)));
          out = new PrintWriter(new OutputStreamWriter(System.out));
        /*out = new PrintWriter(new FileWriter("output.txt"));
        in =new StreamTokenizer(new BufferedReader(new FileReader("input.txt")));*/

        solve();

        out.flush();
    }

    public double nextInt() throws IOException
    {
        in.nextToken();
        return in.nval;
    }
    public void solve() throws IOException
    {
        double a=nextInt(),v=nextInt(),l=nextInt(),d=nextInt(),w=nextInt();
        double s=w*w/(2*a);
        if(s>d || w>v)
        {
        	double t=v*v/(2*a);
        	if(t>l)
        	{
        		double f=2*l/a;
        		out.print(String.format("%.10f",Math.sqrt(f)));
        		return;
        	}
        	double f=v/a;
        	double k=(l-t)/v;
        	out.print(String.format("%.10f",f+k));
        	return;
        }
        double t;
        if((2*v*v-w*w)/(2*a)<d)
        	t=v/a+(v-w)/a+(d-(2*v*v-w*w)/(2*a))/v;
        else
        {
        double v1=Math.sqrt((2*a*d+w*w)/2);
        t=v1/a+(v1-w)/a;
        }
        double r=l-d;
        double tr=(v*v-w*w)/(2*a);
        if(tr>r)
        {
        	double t1=(-w+Math.sqrt(w*w+2*a*r))/a;
        	out.print(String.format("%.10f",t+t1));
        	return;
        }
        r-=(v*v-w*w)/(2*a);
        t+=(v-w)/a;
        out.print(String.format("%.10f",t+r/v));
    }

}
// Problem: 5_D. Follow Traffic Rules
// Time complexity: constant
import java.io.InputStreamReader;
import java.util.Scanner;
import java.io.IOException;

public class kresz {
	public static double a;
	public static double v;
	public static double l;
	public static double d;
	public static double w;
		
	public static double gyorsulut (double v1, double v2) { //v1 -> v2 mennyi utat tesz meg
		return Math.abs((v2*v2-v1*v1)/(2*a));
	}
	public static double gyorsulido (double v1, double v2) { //v1 -> v2 mennyi idő
		return Math.abs((v2-v1)/a);
	}
	
	
	public static void beolvas () throws IOException {
		Scanner be = new Scanner (new InputStreamReader (System.in));
			a = be.nextDouble();
			v = be.nextDouble();
			l = be.nextDouble();
			d = be.nextDouble();
			w = be.nextDouble();
		be.close();
	}
	
	
	public static void main (String args[]) throws IOException {
			beolvas();
			double s = l; //hátralévő út
			double t = 0; //eltelt idő
			
			if (v <= w ||  Math.sqrt(2*a*d) <= w) { //nincs korlátozás
				if (gyorsulut(0,v) > l) {
					t+=gyorsulido(0, Math.sqrt(2*a*l));
					s = 0;
				}
				else {
					s-=gyorsulut(0,v);
					t+=gyorsulido(0,v);
				}
			}
			else {
				
				//gyorsuló szakaszok a korlátozásig
				if (d < gyorsulut(0,v)+gyorsulut(v,w)) {
					double x = Math.sqrt(a*(d-w*w/(2*a))+w*w);
					s-=gyorsulut(0,w)+2*gyorsulut(w,x);
					t+=gyorsulido(0,w)+2*gyorsulido(w,x);
				}
				else {
					s-=gyorsulut(0,v)+gyorsulut(w,v);
					t+=gyorsulido(0,v)+gyorsulido(w,v);
				}
				
				//gyorsuló szakaszok a korlátozástól
				if (gyorsulut(v,w) > l-d) {
					double y = Math.sqrt(2*a*(l-d)+w*w);
					s-= gyorsulut(w,y);
					t+=gyorsulido(w,y);
				}
				else {
					s-=gyorsulut(w,v);
					t+=gyorsulido(w,v);
				}
			}
			
			t+=s/v; //nem gyorsuló szakaszok ideje
			
			System.out.println(t);
			
	}
	
}
// Problem: 5_D. Follow Traffic Rules
// Time complexity: constant
import java.io.*;
import java.util.*;
import java.math.*;

public class D5 {

	static int a, v, l, d;
	static double w;

	static double afterMark( int s, double w) {
		if (2 * s * a > v * v - w * w) { // ���� ��������� v. ����� ��
			return (v - w) * 1.0 / a + (s - (v * v - w * w) * 1.0 / (2 * a)) / v;
		} else { // ���������
			double megav = Math.sqrt((2 * a * s + w * w) * 1.0);
			return (megav - w) / a;
		}
	} 

	public static void main(String args[]) throws IOException {
		boolean online = System.getProperty("ONLINE_JUDGE") != null;
		Scanner in = online ? new Scanner(System.in) : new Scanner(new FileReader("input.txt"));
		PrintWriter out = online ? new PrintWriter(System.out) : new PrintWriter(new FileWriter("output.txt"));
		

		a = in.nextInt();
		v = in.nextInt();
		l = in.nextInt();
		d = in.nextInt();
		w = (double) in.nextInt();
		
		double t,t1,t2;

		if (v > w) { // ����� ��������� ������, ����� ����� ���
		
		
		// ������� ������ �� �����
		
			if (2 * d * a > 2 * v * v - w * w) { // ���� ��������� v. ����� ��
				t1 = (2 * v - w) * 1.0 / a + (d - (2 * v * v - w * w) * 1.0 / (2 * a)) / v; 
			} else if (2 * d * a > w * w) { // ���� �� ���������, �� ���� � ���� - ���������
				double topv = Math.sqrt(d * a + w * w * 1.0 / 2);
				t1 = (2 * topv - w) * 1.0 / a;
			} else { // ���� ����������� �� ������ ����� - �����, ���������
				t1 = Math.sqrt(2 * d * 1.0 / a);
				w = Math.sqrt(2 * a * d * 1.0); 
			}
		// ������� ������ ����� �����
			t2 = afterMark(l - d, w); 
		
		t = t1 + t2;
			
		} else {
			t = afterMark(l, 0.0);		
		}
		
		out.println(t);
		out.flush();
		return;
	}
}