// The "Problem_1" class.
import java.io.*;
public class Problem_1
{
    public static void main (String[] args) throws IOException
    {
	String temp;
	double length1, length2, dist12, math;
	BufferedReader input = new BufferedReader (new FileReader ("DATA1.txt"));
	PrintWriter output = new PrintWriter (new FileWriter ("OUT1.txt"));

	while (1 == 1)
	{
	    temp = input.readLine ();
	    if (temp == null)
	    {
		break;
	    }
	    String[] tempnums = new String [4];
	    tempnums = temp.split (" +");
	    int[] nums = new int [4];
	    for (int i = 0 ; i < 4 ; ++i)
	    {
		nums [i] = Integer.parseInt (tempnums [i]);
	    }
	    length1 = Math.sqrt (Math.pow (nums [0], 2) + Math.pow (nums [1], 2));
	    length2 = Math.sqrt (Math.pow (nums [2], 2) + Math.pow (nums [3], 2));

	    dist12 = Math.sqrt (Math.pow (nums [0] - nums [2], 2) + Math.pow (nums [1] - nums [3], 2));

	    math = Math.acos ((Math.pow (dist12, 2) - Math.pow (length1, 2) - Math.pow (length2, 2)) / (-2 * length1 * length2)) * (180 / Math.PI);

	    if (nums [0] == 0)
	    {
		nums [0] = nums [1] + 1;
	    }
	    if (nums [2] == 0)
	    {
		nums [2] = nums [3] + 1;
	    }

	    math = Math.round (math * 10);
	    math = math / 10;

	    if ((Math.atan (nums [1] / nums [0]) * 180 / Math.PI) < (Math.atan (nums [3] / nums [2]) * 180 / Math.PI))
	    {
		math = 360 - math;
	    }


	    output.println (math);

	}
	output.close ();
    } // main method
} // Problem_1 class

