// editor2
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<ctype.h>
struct Node{
    float data;
    struct Node*next;
};
struct Node*createNode(float val){
    struct Node*newNode=malloc(sizeof(struct Node));
    newNode->data=val;
    newNode->next=NULL;
    return newNode;
}
void insertEnd(struct Node**head,float data){
    struct Node*newNode=createNode(data);
    if(*head==NULL)
    {
        *head=newNode;
        return;
        
    }
    struct Node*temp=*head;
    while(temp->next!=NULL)
    temp=temp->next;
    temp->next=newNode;
}
int isvalid(char*str)
{
    int dotCount=0;int i=0;
    if(str[0]=='-'||str[0]=='+')
    i++;
    for(; str[i]!='\0';i++)
    {
        if(str[i]=='.')
        {
            dotCount++;
            if(dotCount>1)
            return 0;
        }
        else if(!isdigit(str[i]))
        return 0;
    }
    return 1;
}
float calculate(struct Node*head)
{
    float sum=0;
    while (head!=NULL)
    {
        sum+=head->data;
        head=head->next;
    }
    return sum;
}
int main()
{
    struct Node*head=NULL:
    char input[50];
    while(1)
    {
        scanf("%s",input);
        if(strcmp(input,"end")==0)
        break;
        if(!isvalid(input))
        {
            printf("Invalid input");
            return 0;
        }
        float value=atof(input);
        insertEnd(&head,value);
    }
    printf("%2f",calculateSum(head));
    return 0;
}