// editor3
#include<stdio.h>
typedef struct orderdetails{
    char name[30];
    int id;
    float price;
}details;
int main(){
    int n,ind;
    float amt=0;
    if(!scanf("%d",&n)){
        printf("Invalid input");
        return 0;
    }
    if(n<0){
        printf("Invalid input");
        return 0;
    }
    
    details det[n];
    for(ind = 0;ind<n;ind++){
        scanf("%s",&det[ind].name);
        scanf("%d",&det[ind].id);
        scanf("%f",&det[ind].price);
        amt = amt + det[ind].price;
    }
    
    printf("%.2f",amt);
    return 0;
    
}