zz#include <iostream>
#include <iomanip>

using namespace std;
union D {
    int s;   
    float r; 
};

struct E {
    char n[20]; 
    int t; // Type: 1=Full-time(Salary), 2=Part-time (Rate)
    D d;
};

int main(){
    ios_base::sync_with_stdio(false);
    
    int N;
    if (!(cin >> N)) return 1;
    
    float total =0.0f;
    const int H = 160; 
    
    for (int i=0;i<N;++i){
        E emp;
        // Read Name (char array), ID(ignored),and Type
        if(!(cin >> emp.n >> emp.id >> emp.t))break;
        if(emp.t == 1) {
            cin >> emp.d.s;
            total += emp.d.s;
        } else if (emp.t == 2) {
            cin >> emp.d.r;
            total += em.d.r * H;
        }
    }
    cout << fixed << setprecision(2) << total << endl;
    return 0;
    
}