#include<stdio.h>
struct cart{
    char name[20];
    int ID;
    float price;
}dhee;
int main(){
    int n,ind;
    float total;
    scanf("%d",&n);
    if(n<0){
        printf("Invalid input");
        return 0;
    }
    dhee stud[n];
    for(ind=0;ind<n;ind++){
        scanf("%s",stud[ind].name);
        scanf("%d",&stud[ind].ID);
        scanf("%d",&stud[ind].price);
    }
    total=stud[0].price+stud[1].price+stud[2].price;
    printf("%.2f",total);
    return 0;
}