var
S, S1: string;
n, i: integer;
begin
readln(S);
n := pos(' ', S);
if n > 0 then
S := copy(S, 1, n - 1);
S1 := '';
repeat
n := pos('.', S);
if n = 0 then
break;
i := n + 1;
while S[i] in ['0' .. '9'] do
i := i + 1;
i := i - n - 1;
if i > 2 then
delete(S, n + 3, i - 2);
S1 := S1 + copy(S, 1, n + 3);
delete(S, 1, n + 3);
until false;
S1 := S1 + S;
writeln(S1);
readln;
end.