#include<iostream>
#include<iomanip
#include<string>
using namespace std;
int main(){
    float temp;
    string type;
    cin>>temp;
    cin>>type;
    if(type=="celsius"){
        float result =(temp*9/5)+32;
        cout<<fixed<<setprecision(2)<<result;
        
    }
    else if(type=="Fahrehheit"){
        float result = (temp -32)* 5/9;
    }
    else{
        cout<<"Invalid input";
    }
    return 0;
}