Fences
Time limit1sMemory limit512 MB
Given an isosceles triangle formed by two ditches, find the apex angle at the short ditch's end and round it to the nearest degree.
- Level
Easy3 of 10
- Topics
- Geometry, Math, Implementation
- Solved
- No attempts yet
Problem
Farmer John dug a straight ditch of length meters. Then, from the midpoint of the ditch, he dug a short ditch of length meters at an angle to the first ditch, after which he joined the ends of the ditches with fences.
Find the measure of the angle between the fences at the end of the short ditch.

Input
The first line contains a single integer (). The second line contains an integer , the measure of the angle between the ditches in degrees ().
Output
Print a single integer: the measure of the angle at the end of the short ditch in degrees, rounded to the nearest integer.