#include <iostream>
using namespace std;
int main() {
float media;
string macchina;
float km;
float litri;
int conta=0;
int totalekm=0;
int totalelitri=0;
do {
cin>> macchina;
cin>>km;
cin>>litri;
if (km!=0){
totalekm= totalekm + km;
totalelitri= totalelitri + litri;
conta= conta + 1;
}
} while (km!=0);
media= 1.0* totalekm/ totalelitri;
cout<< media;
// your code goes here
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKaW50IG1haW4oKSB7CglmbG9hdCBtZWRpYTsKCXN0cmluZyBtYWNjaGluYTsKCWZsb2F0IGttOwoJZmxvYXQgbGl0cmk7CglpbnQgY29udGE9MDsKCWludCB0b3RhbGVrbT0wOwoJaW50IHRvdGFsZWxpdHJpPTA7CglkbyB7CgkJY2luPj4gbWFjY2hpbmE7CgkJY2luPj5rbTsKCQljaW4+PmxpdHJpOwoJCWlmIChrbSE9MCl7CgkJCXRvdGFsZWttPSB0b3RhbGVrbSArIGttOwoJCQl0b3RhbGVsaXRyaT0gdG90YWxlbGl0cmkgKyBsaXRyaTsKCQkJY29udGE9IGNvbnRhICsgMTsKCQkJCgkJfQoJfSB3aGlsZSAoa20hPTApOwoJbWVkaWE9IDEuMCogdG90YWxla20vIHRvdGFsZWxpdHJpOwoJY291dDw8IG1lZGlhOwoJCgkvLyB5b3VyIGNvZGUgZ29lcyBoZXJlCglyZXR1cm4gMDsKfQ==