import java.awt.*;
import java.io.*; //must import file package
import java.lang.*;
import java.text.*;

public class P1
{
    public static void main (String[] args) throws IOException  //must have throws IOException to make files works
    {

	PrintWriter pw = new PrintWriter (new FileWriter ("OUT1.txt")); //declares an object that will print to a file
	BufferedReader br = new BufferedReader (new FileReader ("DATA1.txt")); //declares an object that will read from a file
	String str = "";
	str = br.readLine (); //read from file, data type read in is string only
	while (str != null)
	{
	    String[] numstring = str.split (" ");  //if there are one line with multiple inputs, str.split(" ") will split the string into how many
	    //ever array elements that are separated by " "(in this case a space)
	    double[] first = new double [2];
	    double[] second = new double [2];
	    double top;
	    double bottom;
	    double result;
	    double insidefirst, insidesecond, inside;
	    for (int m = 0 ; m < 2 ; m++)
	    {
		first [m] = (Double.parseDouble (numstring [m])); //Integer.parseInt(String) will turn a string into a integer
		//pw.println ("f" + first [m]);
	    }
	    for (int n = 0 ; n < 2 ; n++)
	    {
		second [n] = (Double.parseDouble (numstring [n + 2])); //Integer.parseInt(String) will turn a string into a integer
		//pw.println ("s" + second [n]);
	    }
	    if (first [1] == second [1])
	    {

		/*if (first [0] > 0 && second [0] > 0)
		{*/
		pw.println ("0.0");
		break;
		/*}
		else
		{
		    pw.println ("180.0");
		}

		break;*/
	    }
	    /*if (first [0] == second [0])
	    {
		/*
		   if (first [1] > 0 && second [1] > 0)
		   {
		      pw.println ("360.0");
		break;
		/*

		}
		else
		{
		pw.println("180.0");
		}

		break;*/

	    /*if (first [0] == -1 * second [0])
	    {
		pw.println ("180.0");
	    }
	    */
	    if (first [1] < second [1])
	    {
		//pw.println ("frist" + first [0]);
		//pw.println (first [1]);
		//pw.println ("second" + second [0]);
		//pw.println (second [1]);
		top = (first [0] * second [0]) + (first [1] * second [1]);
		insidefirst = Math.pow (first [0], 2) + Math.pow (first [1], 2);
		//pw.println (insidefirst);

		insidesecond = Math.pow (second [0], 2) + Math.pow (second [1], 2);
		//pw.println (insidesecond);
		inside = insidefirst * insidesecond;
		bottom = Math.sqrt (inside);
		//bottom = Math.sqrt ((Math.pow (first [0], 2) + Math.pow (second [0], 2)) * (Math.pow (first [1], 2) + Math.pow (second [1], 2)));
		result = Math.acos (top / bottom) * 180 / (Math.PI);
		// pw.println ("bottom" + bottom);
		//pw.println ("top" + top);
		int r = (int) (result * 100);
		double f = r / 100.0;
		pw.println (360 - f);





	    }
	    if (first [1] > second [1])
	    {
		//pw.println ("frist" + first [0]);
		//pw.println (first [1]);
		//pw.println ("second" + second [0]);
		//pw.println (second [1]);
		top = (first [0] * second [0]) + (first [1] * second [1]);
		insidefirst = Math.pow (first [0], 2) + Math.pow (first [1], 2);
		//pw.println (insidefirst);

		insidesecond = Math.pow (second [0], 2) + Math.pow (second [1], 2);
		//pw.println (insidesecond);
		inside = insidefirst * insidesecond;
		bottom = Math.sqrt (inside);
		//bottom = Math.sqrt ((Math.pow (first [0], 2) + Math.pow (second [0], 2)) * (Math.pow (first [1], 2) + Math.pow (second [1], 2)));
		result = Math.acos (top / bottom) * 180 / (Math.PI);
		//pw.println ("bottom" + bottom);
		//pw.println ("top" + top);
		int r = (int) (result * 100);
		double f = r / 100.0;
		pw.println (f);

	    }
	    str = br.readLine ();
	}
	pw.close (); //close file, make sure all output are included in output file
	br.close ();

	// Place your program here.  'c' is the output console
    } // main method
} // P1 class

