#include <stdio.h>
#include <stdlib.h>
#include <string.h>

double text2double(const char *p) {
    char *v = strchr(p, ',');
    if (v) *v = '.';
    return strtod(p, NULL);
}

int main(void) {
	double x, y = 0;
	char buf[100];
    while (fgets(buf, sizeof buf, stdin)) {
        x = text2double(buf);
        printf("%f\n", x);
        y += x;
    }
    printf("total: %f\n", y);
	return 0;
}
