#include <stdio.h>
#include <ctype.h>
/*
int atoi(char s[])
{
int i = 0;
int result, sign;
while(isspace(s[i++])) ;
for(sign = 1; '+' == s[i] || '-' == s[i]; ++i)
{
if ('-' == s[i])
sign *= -1;
}
for(result = 0;isdigit(s[i]); ++i)
result = result*10 + (s[i] - '0');
return result * sign;
}
*/
double atof(char s[])
{
double val, power;
int i, sign;
for (i = 0; isspace(s[i]); ++i)
;
for (sign = 1; '+' == s[i] || '-' == s[i]; ++i)
if ('-' == s[i])
sign *= -1;
for (val = 0.0; isdigit(s[i]); ++i)
val = val*10.0 + (s[i] - '0');
if ('.' == s[i])
++i;
for (power = 1.0; isdigit(s[i]); ++i)
{
val = val*10.0 + (s[i] - '0');
power *= 10;
}
return sign * val / power;
}
int atoi(char s[])
{
return (int)atof(s);
}
int main(void)
{
char s[50];
scanf("%s", s);
printf("%f\n%d\n", atof(s),atoi(s));
return 0;
}