#include<studio.h>

struct ord
{
 char name[50];
 int id;
 float price;
};
int main()
{
    int n;
    scanf("%d",&n);
    if(n <= 0)
    {
        printf("Invalid input");
        return 0;
    }
    struct ord s[n];
    float tot = 0.0;
    for(int i = 0; i < n; i++)
    {
        scanf("%s",s[i].name);
        scanf("%d",&s[i].id);
        scanf("%f",&s[i].price);
        tot += s[i].price;
    }
    printf("%.2f",tot);
    return 0;
}