﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Tourist_Information
{
    class Program
    {
        static void Main(string[] args)
        {
            string unit = Console.ReadLine();
            double getValue = double.Parse(Console.ReadLine());
            double transformUnit = 0;

            switch (unit)
            {
                case "miles":
                    transformUnit = getValue * 1.6;
                    Console.WriteLine("{0} miles = {1:F2} kilometers", getValue, transformUnit);
                    break;
                case "inches":
                    transformUnit = getValue * 2.54;
                    Console.WriteLine("{0} inches = {1:F2} centimeters", getValue, transformUnit);
                    break;
                case "feet":
                    transformUnit = getValue * 30;
                    Console.WriteLine("{0} feet = {1:F2} centimeters", getValue, transformUnit);
                    break;
                case "yards":
                    transformUnit = getValue * 0.91;
                    Console.WriteLine("{0} yards = {1:F2} meters", getValue, transformUnit);
                    break;
                case "gallons":
                    transformUnit = getValue * 3.8;
                    Console.WriteLine("{0} gallons = {1:F2} liters", getValue, transformUnit);
                    break;
            }
        }
    }
}
