#include <iostream> #include <cstdio> using namespace std; int main() { int a, n, m; double p, q; cin >> a >> n >> p >> a >> m >> q; printf("VALOR A PAGAR: R$ %.2lf", n * p + m * q); return 0; }