#include<stdio.h>
int main()
{
    int quantity_x,price_x;
    int quantity_y,price_y;
    int quantity_z,price_z;
    int total;
    scanf("%d %d",&quantity_x,&price_x);
    scanf("%d %d",&quantity_y,&price_y);
    scanf("%d %d",&quantity_z,&price_z);
    if(quantity_x>0&&price_x>0&&quantity_y>0&&price_y>0&&quantity_z>0&&price_z>0)
    {
        total=quantity_x*price_x+quantity_y*price_y+quantity_z*price_z;
        printf("%d",t
    {
        printf