/*
   Project 2:	  In the Lab #2
   Programmer:	  Gary Haines
   Date:	  January 23, 2003
   Program Name:  Balance
*/

import java.io.*;

public class Balance
{
   public static void main(String[] args) throws IOException
   {
	BufferedReader dataIn = new BufferedReader(new InputStreamReader(System.in));

	//Declare Variables
	String strBegBalance;
	String strDeposits;
	String strChecks;
	String strFees;
	float begBalance;
	float deposits;
	float checks;
	float fees;
	float balance;

	//Input Values
	System.out.println("What is the balance from your last statement?");
		strBegBalance = dataIn.readLine();
	System.out.println("What is the total amount of all deposits?");
		strDeposits = dataIn.readLine();
	System.out.println("What is the total amount of all checks?");
		strChecks = dataIn.readLine();
	System.out.println("What is the total amount of all transaction fees?");
		strFees = dataIn.readLine();

	//Conversions
	begBalance = Float.parseFloat(strBegBalance);
	deposits = Float.parseFloat(strDeposits);
	checks = Float.parseFloat(strChecks);
	fees = Float.parseFloat(strFees);

	//Calculations
	balance = begBalance + deposits - checks - fees;

	//Output
	System.out.println("Your new balance is " + balance);

   }
}