#include <stdio.h>

int main() {
    double price = 1.0, amount, sum = 0.0;

    while (price != 0) {
        printf("Enter next data (price amount): ");
        scanf("%lf%lf", &price, &amount);
        sum += price * amount;
    }

    printf("Total price: %f\n", sum);

    return 0;
}





