Darts#2077

Darts

2 seconds
256 megabytes
Very easy

Darts is a game where players throw short arrows (darts) at a circular target mounted on a wall. The standard dartboard is divided into twenty numbered sectors, each assigned a number from to . At the center is the "bullseye", worth points, which is surrounded by a green ring worth points. The board also features an outer narrow ring (the "doubles" ring), which doubles the value of the sector, and an inner narrow ring (the "triples" ring), which triples the sector's value. The scores for each sector are shown on the board. The outer and inner narrow rings are traditionally colored red and green. If a dart lands outside the circle defined by the outer narrow ring, it scores no points. The target is mounted such that its center coincides with the point . It is known that after a throw, the dart lands at the coordinates (all coordinates are given in millimeters, where is the vertical coordinate and is the horizontal coordinate). Your task is to determine how many points the player scores for this throw. It is guaranteed that the dart does not land on the boundary between two sectors, allowing you to determine the score unambiguously.

Standard dartboard dimensions:

Input

The input contains two decimal numbers (each with digits after the decimal point) separated by a space, representing the coordinates of the point.

Output

Print a single number — the answer to the problem.

Examples

Example 1

Loading
Loading