﻿using System;


namespace _02.ChooseADrink2._0
{
    class Program
    {
        static void Main(string[] args)
        {
            string profession = Console.ReadLine();
            int quantity = int.Parse(Console.ReadLine());
            double coffeePrice = 1.0;
            double waterPrice = 0.7;
            double beerPrice = 1.70;
            double teaPrice = 1.20;
            double totalPrice = 0.0;

            if (profession == "Athlete")
            {
                totalPrice = waterPrice * quantity;
            }
            else if (profession == "Businessman" || profession == "Businesswoman")
            {
                totalPrice = coffeePrice * quantity;
            }
            else if (profession == "SoftUni Student")
            {
                totalPrice = beerPrice * quantity;
            }
            else
            {
                totalPrice = teaPrice * quantity;
            }
            Console.WriteLine($"The {profession} has to pay {totalPrice:F2}.");
        }
    }
}
