from decimal import Decimal
k=float(input())
F=(Decimal(k)-Decimal('273.15'))*Decimal('1.8')+Decimal('32')
print(F)