One rainy gloomy evening when all modules hid in the nearby cafes to drink hot energetic cocktails, the Hexadecimal virus decided to fly over the Mainframe to look for a Great Idea. And she has found one!

Why not make her own Codeforces, with blackjack and other really cool stuff? Many people will surely be willing to visit this splendid shrine of high culture.

In Mainframe a standard pack of 52 cards is used to play blackjack. The pack contains cards of 13 values: 2, 3, 4, 5, 6, 7, 8, 9, 10, jacks, queens, kings and aces. Each value also exists in one of four suits: hearts, diamonds, clubs and spades. Also, each card earns some value in points assigned to it: cards with value from two to ten earn from 2 to 10 points, correspondingly. An ace can either earn 1 or 11, whatever the player wishes. The picture cards (king, queen and jack) earn 10 points. The number of points a card earns does not depend on the suit. The rules of the game are very simple. The player gets two cards, if the sum of points of those cards equals *n*, then the player wins, otherwise the player loses.

The player has already got the first card, it's the queen of spades. To evaluate chances for victory, you should determine how many ways there are to get the second card so that the sum of points exactly equals *n*.
The only line contains *n* (1 ≤ *n* ≤ 25) — the required sum of points.
12
4
20
15
10
0
11
4
15
4
18
4
25
0
22
0
1
0
2
0
3
0
4
0
5
0
6
0
7
0
8
0
9
0
13
4
14
4
16
4
17
4
19
4
21
4
23
0
24
0
import sys
from math import pi, sqrt, acos, sin
from statistics import mode

# arr = []
# temp = input().split()
# n, r, w, h = [int(x) for x in temp]
# for _ in range(n):
#     temp = input().split()
#     arr.append([int(x) for x in temp])

def tmp(x):
    if x < 0: return -1
    return 1

def circseg(x1, y1, x2, y2, R):
    # x1, y1, x2, y2 the points of the chord
    # R the radius
    a = sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2) # chord length
    r = 0.5 * sqrt(4 * R ** 2 - a ** 2) # distance from center to chord
    h = R - r # distance from chord to edge
    return R ** 2 * acos((R - h) / R) - (R - h) * sqrt(2 * R * h - h ** 2)

def shoelace(X, Y):
    # Assumed clockwise
    csum = 0
    for i in range(len(X)):
        csum += X[i] * Y[(i + 1) % len(X)]
        csum -= X[(i + 1) % len(X)] * Y[i]
    return abs(csum) / 2

def pos(x1, y1, x2, y2, x, y):
    # x1, y1, x2, y2 define line
    # x, y the point
    return (x2 - x1) * (y - y1) - (y2 - y1) * (x - x1) > 0

w= 41
h= 67
file_path = "arvinInput.txt"
with open(file_path,"r") as file:
    for line in file:
        values = line.split()
        assert(len(values)==4)
        x, y, r, ans = int(values[0]), int(values[1]), int(values[2]), float(values[3])
        # Vertices
        v = [[0, h], [w, h], [w, 0], [0, 0]] * 3

        # Identifying the points of intersection at all 4 sides
        ints = [] # U, R, D, L = 0, 1, 2, 3. Element [x, y, i] means there's intersection on side i at point x, y
        for i in range(4):
            x1, y1 = v[i]
            x2, y2 = v[i+1]
            x1 -= x; x2 -= x; y1 -= y; y2 -= y
            d1, d2 = x2 - x1, y2 - y1
            dr = d1 ** 2 + d2 ** 2
            D = x1 * y2 - x2 * y1

            disc = r ** 2 * dr - D ** 2
            if disc <= 0:
                continue

            xi1, xi2 = (D * d2 + tmp(d2) * d1 * sqrt(r ** 2 * dr - D ** 2)) / (dr), (D * d2 - tmp(d2) * d1 * sqrt(r ** 2 * dr - D ** 2)) / (dr)
            yi1, yi2 = (-1 * D * d1 + d2 * sqrt(r ** 2 * dr - D ** 2)) / (dr), (-1 * D * d1 - d2 * sqrt(r ** 2 * dr - D ** 2)) / (dr)

            # Maintaining clockwise
            if i == 0:
                xi1, xi2 = sorted([xi1, xi2])
            elif i == 1:
                yi1, yi2 = sorted([yi1, yi2], reverse = True)
            elif i == 2:
                xi1, xi2 = sorted([xi1, xi2], reverse = True)
            elif i == 3:
                yi1, yi2 = sorted([yi1, yi2])

            if xi1 + x >= 0 and yi1 + y >= 0 and xi1 + x <= w and yi1 + y <= h:
                ints.append([xi1 + x, yi1 + y, i])
            if xi2 + x >= 0 and yi2 + y >= 0 and xi2 + x <= w and yi2 + y <= h:
                ints.append([xi2 + x, yi2 + y, i])

        if len(ints) > 0:
            ints.append(ints[0]) # To loop around

        # Iterate over the intersection points clockwise, keeping track of if the circle is leaving or entering the rectangle.
        # The only edge cases are: 1) circle entirely inside
        carea = w * h
        if len(ints) > 0:
            exit = (ints[0][0] > x) ^ (ints[0][1] > y) # Is the circle moving outwards or in on the first point, going clockwise. If true, it's going out.
        else: exit = False
        for i in range(len(ints) - 1):
            if exit:
                exit = False; continue
            exit = True
            if (ints[i + 1][2] - ints[i][2]) % 4 == 1:
                # Subtract triangle, add circ segment.
                carea -= shoelace([ints[i][0], v[ints[i+1][2]][0], ints[i+1][0]], [ints[i][1], v[ints[i+1][2]][1], ints[i+1][1]])
                carea += circseg(ints[i][0], ints[i][1], ints[i+1][0], ints[i+1][1], r)
            elif (ints[i + 1][2] - ints[i][2]) % 4 == 2:
                # Subtract trapezoid, add circ segment.
                carea -= shoelace([ints[i][0], v[ints[i][2] + 1][0], v[ints[i][2] + 2][0], ints[i+1][0]], [ints[i][1], v[ints[i][2] + 1][1], v[ints[i][2] + 2][1], ints[i+1][1]])
                carea += circseg(ints[i][0], ints[i][1], ints[i+1][0], ints[i+1][1], r)
            elif (ints[i + 1][2] - ints[i][2]) % 4 == 3:
                # Subtract pentagon, add circ segment. Check for major arc
                carea -= shoelace([ints[i][0], v[ints[i][2] + 1][0], v[ints[i][2] + 2][0], v[ints[i][2] + 3][0], ints[i+1][0]], [ints[i][1], v[ints[i][2] + 1][1], v[ints[i][2] + 2][1], v[ints[i][2] + 3][1], ints[i+1][1]])
                # Checking corner over/under same as center
                if pos(ints[i][0], ints[i][1], ints[i+1][0], ints[i+1][1], v[ints[i][2] + 2][0], v[ints[i][2] + 2][1]) == pos(ints[i][0], ints[i][1], ints[i+1][0], ints[i+1][1], x, y):
                    carea += pi * r ** 2 - circseg(ints[i][0], ints[i][1], ints[i+1][0], ints[i+1][1], r)
                else:
                    carea += circseg(ints[i][0], ints[i][1], ints[i+1][0], ints[i+1][1], r)
            else:
                # Subtract entire rectangle.
                carea -= w * h
                # Add back the major arc.
                carea += (pi * r ** 2) - circseg(ints[i][0], ints[i][1], ints[i+1][0], ints[i+1][1], r)

        # Checking edge case, which is circle inside.
        if len(ints) == 0:
            carea = min(w * h, pi * r ** 2)
        print(carea-ans)

