#include <iostream>
int main()
{
double v1, v2, s, t,s1;
std::cin >> v1 >> v2 >> s >> t;
s1 = (v1 + v2) * t + s;
std::cout << s1;
return 0;
}
#include <iostream>
int main()
{
double v1, v2, s, t,s1;
std::cin >> v1 >> v2 >> s >> t;
s1 = (v1 + v2) * t + s;
std::cout << s1;
return 0;
}