#include <stdio.h>
#include <stdlib.h>
#include <string.h>

typedef struct Node {
    double data;
    struct Node* next;
} Node;

int main() {
    char input[50];
    Node* head = NULL, *tail = NULL;
    double sum = 0;
    
    while (1) {
        scanf("%s", input);
        
        if (strcmp(input, "end") == 0) break;
        
        char* endptr;
        double value = strtod(input, &endptr);
        
        if (*endptr != ' ') {
            printf("Invalid input\n");
            return 0;
        }
        
        Node* node = (Node*)malloc(sizeof(Node));
        node->data = value;
        node->next = NULL;
        
        if (!head) {
            head = tail = node;
        } else {
            tail->next = node;
            tail = node;
        }
        
        sum += value;
    }
    
    if (sum == (long long)sum) {
        printf("%.0f\n", sum);
    } else {
        printf("%g\n", sum);
    }
    
    return 0;
}