// Arup Guha
// 1/12/2026
// Solution to COP 3330 Program 1B: Gas Cost Estimate.

import java.util.*;

public class gascost {

	public static void main(String[] args) {

		// Declare our scanner.
		Scanner stdin = new Scanner(System.in);
		
		// Get all user inputs.
		System.out.println("How many times a week do you come to UCF?");
		int numTimes = stdin.nextInt();
		System.out.println("How many miles is your home from UCF?");
		double dist = stdin.nextDouble();
		System.out.println("How many miles per gallon does your car get?");
		double mpg = stdin.nextDouble();
		System.out.println("What is the cost of a gallon of gas in dollars?");
		double galCost = stdin.nextDouble();
		
		// Total drive, don't forget the round trip!
		double totalDrive = numTimes*dist*2;
		System.out.println("You will drive "+totalDrive+" miles a week to and from work.");
		
		// Total gallons used.
		double totalGal = totalDrive/mpg;
		System.out.println("You will use "+totalGal+" gallons of gas.");
		
		// Total cost.
		double totalCost = galCost*totalGal;
		System.out.println("You spend a total of $"+totalCost+" for your commute.");
		
	}
}
