#include <bits/stdc++.h>
using namespace std;
int main() {
    double K, C, F;
    cin >> K;
    C = K - 273.15;
    F = C * 1.8 + 32;
    printf("%.9f", F);
    return 0;
}