// Arup Guha
// 8/25/2026
// Solution to COP 3330 Program 1B: Buying Concert Tickets

import java.util.*;

public class tickets {

	public static void main(String[] args) {
	
		Scanner stdin = new Scanner(System.in);
		
		// Get user input.
		System.out.println("How much does a single lower bowl ticket cost in dollars?");
		double costLower = stdin.nextDouble();
		System.out.println("How much does a single upper bowl ticket cost in dollars?");
		double costUpper = stdin.nextDouble();
		System.out.println("How many lower bowl tickets are you purchasing?");
		int numLower = stdin.nextInt();
		System.out.println("How many upper bowl tickets are you purchasing?");
		int numUpper = stdin.nextInt();
		
		// Compute total cost.
		double total = costLower*numLower + costUpper*numUpper;
		
		// Output total cost.
		System.out.printf("Your total cost is $%.2f\n", total);
	}
}