#include <cstdio> int main() { int s1, n1, s2, n2; double p1, p2; scanf("%d%d%lf%d%d%lf", &s1, &n1, &p1, &s2, &n2, &p2); printf("VALOR A PAGAR: R$ %.2lf\n", n1 * p1 + n2 * p2); return 0; }