#include<stdio.h>
#include<string.h>
#include<ctype.h>

typedef struct purchase{
    char name[20];
    int id;
    float price;
}pr;

int main(){
    int n ;
    float total=0.0;
    scanf("%d",&n);
    
     if(n<0 || n>10){
        printf("Invalid input");
        return 0;
    }
     
    pr arr[n];
    for(int i=0 ; i<n ; i++){
       if(! (scanf("%s %d %f ",arr[i].name,&arr[i].id,&arr[i].price))){
           printf("Invalid input");
           return 0;
       }
        
        // for(int j=0 ; j<strlen(arr[i].name);j++){
        //     if(!isalpha(arr[i].name[j])){
        //         printf("Invalid input");
        //         return 0;
            }
        }
    }
    
    
    
    for(int i=0 ; i<n ; i++){
        
    total+=arr[i].price;
    }
    
    printf("%.2f",total);
    
    return 0;
}