from sys import stdin
from math import pi
convs = {
"dd": (lambda x: x),
"dr": (lambda x: x * (pi / 180)),
"rd": (lambda x: x * (180 / pi)),
"rr": (lambda x: x),
"cc": (lambda x: x),
"cf": (lambda x: x * (9 / 5) + 32),
"ck": (lambda x: x + 273.15),
"fc": (lambda x: (x - 32) * (5 / 9)),
"ff": (lambda x: x),
"fk": (lambda x: (x + 459.67) * (5 / 9)),
"kc": (lambda x: x - 273.15),
"kf": (lambda x: x * (9 / 5) - 459.67),
"kk": (lambda x: x)
}
for input in stdin:
input = input.strip()
val = float(input[:-2])
conv = input[-2:]
if conv in convs:
print("{:.1f}".format(convs[conv](val)) + conv[1])
else:
print("No candidate for conversion")
ZnJvbSBzeXMgaW1wb3J0IHN0ZGluCmZyb20gbWF0aCBpbXBvcnQgcGkKCmNvbnZzID0gewogICAgImRkIjogKGxhbWJkYSB4OiB4KSwKICAgICJkciI6IChsYW1iZGEgeDogeCAqIChwaSAvIDE4MCkpLAogICAgInJkIjogKGxhbWJkYSB4OiB4ICogKDE4MCAvIHBpKSksCiAgICAicnIiOiAobGFtYmRhIHg6IHgpLAogICAgImNjIjogKGxhbWJkYSB4OiB4KSwKICAgICJjZiI6IChsYW1iZGEgeDogeCAqICg5IC8gNSkgKyAzMiksCiAgICAiY2siOiAobGFtYmRhIHg6IHggKyAyNzMuMTUpLAogICAgImZjIjogKGxhbWJkYSB4OiAoeCAtIDMyKSAqICg1IC8gOSkpLAogICAgImZmIjogKGxhbWJkYSB4OiB4KSwKICAgICJmayI6IChsYW1iZGEgeDogKHggKyA0NTkuNjcpICogKDUgLyA5KSksCiAgICAia2MiOiAobGFtYmRhIHg6IHggLSAyNzMuMTUpLAogICAgImtmIjogKGxhbWJkYSB4OiB4ICogKDkgLyA1KSAtIDQ1OS42NyksCiAgICAia2siOiAobGFtYmRhIHg6IHgpCn0KCmZvciBpbnB1dCBpbiBzdGRpbjoKICAgIGlucHV0ID0gaW5wdXQuc3RyaXAoKQogICAgdmFsID0gZmxvYXQoaW5wdXRbOi0yXSkKICAgIGNvbnYgPSBpbnB1dFstMjpdCiAgICBpZiBjb252IGluIGNvbnZzOgogICAgICAgIHByaW50KCJ7Oi4xZn0iLmZvcm1hdChjb252c1tjb252XSh2YWwpKSArIGNvbnZbMV0pCiAgICBlbHNlOgogICAgICAgIHByaW50KCJObyBjYW5kaWRhdGUgZm9yIGNvbnZlcnNpb24iKQ==