#include <bits/stdc++.h>
using namespace std;
typedef long long ll;

struct Employee {
    string id, name;
    double hs, lcb, pc;
};


int main () {
    cin.tie(NULL); cout.tie(NULL); ios_base::sync_with_stdio(false);

    fstream file("DATA.txt");
    
    Employee a[10];
    for (int i=0; i<10; i++) {
        getline(cin, a[i].id);
        getline(cin, a[i].name);
        cin >> a[i].hs;
        cin >> a[i].lcb;
        cin >> a[i].pc;
        cin.ignore();
    }

    for (int i=0; i<10; i++) {
        file << a[i].id << endl << a[i].name << endl << a[i].hs << endl << a[i].lcb << endl << a[i].pc << endl << a[i].hs*a[i].lcb+a[i].pc << endl;
        cout << a[i].hs*a[i].lcb+a[i].pc;
    }

    file.close();


    return 0; 
}