#include<iostream>
using namespace std;
class Time {
public :
show(double a, double b, double c) {
this->a = a;
this->b = b;
this->c = c;
}
double show01();
protected:
double a;
double b;
double c;
};
double Time::show01() {
return a + b * c;
}
class A: public Time {
public :
double show11();
};
double A::show11() {
return a * b * c;
}
int main() {
// double a;
// double b;
// double c;
// cin>>a>>b>>c;
// Time t;
// A a;
// a.show(a,b,c);
// cout<<a.show11();
// cout<<endl;
// t.show(a,b,c);
// cout<<t.show01()<<endl;
// return 0;
double a;
double b;
double c;
cin>>a>>b>>c;
Time s;
A m;
m.show(a, b, c);
s.show(a, b, c);
cout << s.show01() << endl;
cout << m.show01() << endl;
cout << m.show11() << endl;
}