#include<iostream> using namespace std; int main(){ double n1,k1,p1; double n2,k2,p2; cin>>n1>>k1>>p1; cin>>n2>>k2>>p2; printf("VALOR A PAGAR: R$ %.2lf\n",k1*p1+k2*p2); return 0; }