a = float(input())

area = a * a

print(area)

"""
Explanation: <h1 align="center">Simple-Calculations-Exercises</h1>

<h2>01.Square Area</h2>

The first task on this topic is to write a console program that introduces an integer a
calculates the face of a square with side a. The task is trivially easy: you enter a number from the console,
multiply it by yourself and print the result of the console.
End of explanation
"""


inches = float(input('inches = '))

centimeters = inches * 2.54

print('Centimeters = ',centimeters)

"""
Explanation: <h2>02.Inches to Centimeters</h2>

Write a program that reads a console number (not necessarily a whole) and converts the number from inches in centimeters. For this purpose, it multiplies the inches by 2.54 (because 1 inch = 2.54 centimeters).
End of explanation
"""


name = input()

print(f'Hello, {name}!')

"""
Explanation: <h2>03.Greeting by Name</h2>

Write a program that reads a person's name from the console and prints "Hello, (name)!",
Where (name) is the previously entered name.
End of explanation
"""


first_name = input()
last_name = input()
age = int(input())
town = input()

print(f"You are {first_name} {last_name}, a {age}-years old person from {town}.")


"""
Explanation: <h2>04.Concatenate Data</h2>

Write a Python program that reads from the console name, surname, age, and city and prints a message from type: "You are (firstName), (lastName), (age) years old person from (town);"
End of explanation
"""


b1 =  float(input())
b2 = float(input())
h = float(input())

area = ((b1 + b2) * h) / 2

print(area)

"""
Explanation: <h2>05. Trapeziod Area</h2>

Write a program that reads from the console three real numbers b1, b2 and h and calculates the trapeze face with bases b1 and b2 and height h.
The trapezoidal face formula is (b1 + b2) * h / 2.
End of explanation
"""


import math

r = float(input())

area = math.pi * r * r
perimeter = 2 * math.pi * r

print(f"Area = {area}")
print(f"Perimeter = {perimeter}")

"""
Explanation: <h2>06.Circle Area and Perimeter</h2>

Write a program that reads from the console number r and calculates and prints the face and perimeter of a circle / circle with radius r.
End of explanation
"""


x1 = float(input())
y1 = float(input())
x2 = float(input())
y2 = float(input())


side_x = abs(x1 - x2)
side_y = abs(y1 - y2)

area = side_x * side_y
perimeter = side_x * 2 + side_y * 2

print(area)
print(perimeter)

"""
Explanation: <h2>07.2D Rectangle Area</h2>

A rectangle is given with the coordinates of two of its opposite angles (x1, y1) - (x2, y2).
Calculate its area and perimeter.
The input is read from the console.
The numbers x1, y1, x2 and y2 are given in one order.
The output is output to the console and must contain two rows with one number each - face and perimeter.
End of explanation
"""


side = float(input())
height = float(input())

area = (side * height) / 2

print("Triangle area = ",float("{0:.2f}".format(area)))

"""
Explanation: <h2>08.Triangle Area</h2>

Write a program that reads from the console side and triangle height and calculates its face.
Use the face to triangle formula: area = a * h / 2.
Round the result to 2 decimal places using float ("{0: .2f}".
End of explanation
"""


celsius = float(input())

fahrenheit = celsius * 9/5 + 32

print(float("{0:.2f}".format(fahrenheit)))

"""
Explanation: <h2>09.Celsius to Fahrenheit</h2>

Write a program that reads degrees on the Celsius scale (°C) and converts them to degrees Fahrenheit (°F).
Look for an appropriate formula on the Internet to make the calculations.
Round the score to 2 decimal places.
End of explanation
"""


import  math

radians = float(input())

degrees = round((radians * 180) / math.pi)

print(degrees)

"""
Explanation: <h2>10.Radians to Degrees</h2>

Write a program that reads an angle in radians (rad) and converts it into degrees (deg).
Look for an appropriate formula online.
The number π in Python programs is available through math.pi.
Round the result to the nearest integer using round ().
End of explanation
"""


dollars = float(input())

leva = dollars * 1.79549

print(float("{0:.2f}".format(leva)),"BGN")

"""
Explanation: <h2>11.USD to BGN</h2>

Write down a program to convert US Dollars (USD) into Bulgarian Leva (BGN). Round the score to 2 digits after the decimal point. Use a fixed exchange rate between USD and BGN: 1 USD = 1.79549 BGN.
End of explanation
"""


amount = float(input())
first_currency = input()
second_currency = input()

result = 0

if first_currency == "BGN":

    if second_currency == "BGN":
       result = amount * 1

    elif second_currency == "USD":
        result = amount / 1.79549

    elif second_currency == "EUR":
        result = amount / 1.95583

    elif second_currency == "GBP":
        result = amount / 2.53405

elif first_currency == "USD":

    if second_currency == "BGN":
        result = amount * 1.79549

    elif second_currency == "USD":
        result = amount * 1

    elif second_currency == "EUR":
        result = (amount * 1.79549) / 1.95583

    elif second_currency == "GBP":
        result = (amount * 1.79549) / 2.53405

elif first_currency == "EUR":

    if second_currency == "BGN":
        result = amount * 1.95583

    elif second_currency == "USD":
        result = (amount * 1.95583 ) / 1.79549

    elif second_currency == "EUR":
        result = amount * 1

    elif second_currency == "GBP":
        result = (amount * 1.95583 ) / 2.53405


elif first_currency == "GBP":

    if second_currency == "BGN":
        result = amount * 2.53405

    elif second_currency == "USD":
        result = (amount * 2.53405) / 1.79549

    elif second_currency == "EUR":
        result = (amount * 2.53405) / 1.95583

    elif second_currency == "GBP":
        result = amount * 1

print(float("{0:.2f}".format(result)),second_currency)

"""
Explanation: <h2>12.Currency Converter</h2>

Write a program for converting money from one currency to another.
The following currencies need to be maintained: BGN, USD, EUR, GBP.
Use the following fixed exchange rates:
BGN = 1.79549 USD / 1.95583 EUR / 2.53405 GBP
The input is a conversion amount + Input Currency + Output Currency.
The output is one number - the converted amount on the above courses, rounded to 2 digits after the decimal point.
End of explanation
"""


