#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;
}
I2luY2x1ZGUgPGJpdHMvc3RkYysrLmg+CnVzaW5nIG5hbWVzcGFjZSBzdGQ7CnR5cGVkZWYgbG9uZyBsb25nIGxsOwoKc3RydWN0IEVtcGxveWVlIHsKICAgIHN0cmluZyBpZCwgbmFtZTsKICAgIGRvdWJsZSBocywgbGNiLCBwYzsKfTsKCgppbnQgbWFpbiAoKSB7CiAgICBjaW4udGllKE5VTEwpOyBjb3V0LnRpZShOVUxMKTsgaW9zX2Jhc2U6OnN5bmNfd2l0aF9zdGRpbyhmYWxzZSk7CgogICAgZnN0cmVhbSBmaWxlKCJEQVRBLnR4dCIpOwogICAgCiAgICBFbXBsb3llZSBhWzEwXTsKICAgIGZvciAoaW50IGk9MDsgaTwxMDsgaSsrKSB7CiAgICAgICAgZ2V0bGluZShjaW4sIGFbaV0uaWQpOwogICAgICAgIGdldGxpbmUoY2luLCBhW2ldLm5hbWUpOwogICAgICAgIGNpbiA+PiBhW2ldLmhzOwogICAgICAgIGNpbiA+PiBhW2ldLmxjYjsKICAgICAgICBjaW4gPj4gYVtpXS5wYzsKICAgICAgICBjaW4uaWdub3JlKCk7CiAgICB9CgogICAgZm9yIChpbnQgaT0wOyBpPDEwOyBpKyspIHsKICAgICAgICBmaWxlIDw8IGFbaV0uaWQgPDwgZW5kbCA8PCBhW2ldLm5hbWUgPDwgZW5kbCA8PCBhW2ldLmhzIDw8IGVuZGwgPDwgYVtpXS5sY2IgPDwgZW5kbCA8PCBhW2ldLnBjIDw8IGVuZGwgPDwgYVtpXS5ocyphW2ldLmxjYithW2ldLnBjIDw8IGVuZGw7CiAgICAgICAgY291dCA8PCBhW2ldLmhzKmFbaV0ubGNiK2FbaV0ucGM7CiAgICB9CgogICAgZmlsZS5jbG9zZSgpOwoKCiAgICByZXR1cm4gMDsgCn0=