Under construction

Still being built. Things may change

Fences

Time limit1sMemory limit512 MB

Summary
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 2⋅n2 \cdot n meters. Then, from the midpoint of the ditch, he dug a short ditch of length nn meters at an angle α\alpha 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 nn (1≤n≤10001 \le n \le 1000). The second line contains an integer α\alpha, the measure of the angle between the ditches in degrees (0<α<1800 < \alpha < 180).

Output

Print a single integer: the measure of the angle at the end of the short ditch in degrees, rounded to the nearest integer.

Examples1

  1. Example 1

    Input
    2
    90
    
    Expected output
    90