#include <iostream>
#include <stdio.h>
#include <math.h>
using namespace std;
int main() {
int i;
double L1, L, m, cm, mm;
scanf("%lf", &L1); // Вводим значение длины в дюймах
L = L1*25.4; // Переводим дюймы в миллиметры
cout << L << endl;
m = floor(L/1000.);
cm = floor((L - 1000.*m)/10.);
mm = L - 1000.*m - 10.*cm;
printf("%.2f дюймов = %.0f м %.0f см %.2f мм \n", L1, m, cm, mm);
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8c3RkaW8uaD4KI2luY2x1ZGUgPG1hdGguaD4KdXNpbmcgbmFtZXNwYWNlIHN0ZDsKCmludCBtYWluKCkgewoJaW50IGk7Cglkb3VibGUgTDEsIEwsIG0sIGNtLCBtbTsKCQoJc2NhbmYoIiVsZiIsICZMMSk7CSAJLy8g0JLQstC+0LTQuNC8INC30L3QsNGH0LXQvdC40LUg0LTQu9C40L3RiyDQsiDQtNGO0LnQvNCw0YUKCUwgPSBMMSoyNS40OyAgICAgICAgICAgIC8vINCf0LXRgNC10LLQvtC00LjQvCDQtNGO0LnQvNGLINCyINC80LjQu9C70LjQvNC10YLRgNGLCgljb3V0IDw8IEwgPDwgZW5kbDsKCW0gPSBmbG9vcihMLzEwMDAuKTsKCWNtID0gZmxvb3IoKEwgLSAxMDAwLiptKS8xMC4pOwoJbW0gPSBMIC0gMTAwMC4qbSAtIDEwLipjbTsKCglwcmludGYoIiUuMmYg0LTRjtC50LzQvtCyICA9ICAlLjBmINC8ICAlLjBmINGB0LwgICUuMmYg0LzQvCAgXG4iLCBMMSwgbSwgY20sIG1tKTsKCXJldHVybiAwOwp9