/*
   Project 2:	  In the Lab #1
   Programmer:	  Gary Haines
   Date:	  January 22, 2003
   Program Name:  DebtRatio
*/

import java.io.*;

public class DebtRatio
{
   public static void main(String[] args) throws IOException
   {
	BufferedReader dataIn = new BufferedReader(new InputStreamReader(System.in));

	//Declare Variables
	String strMonthlyIncome;
	String strMortgage;
	String strAutoLoan;
	String strOtherDebt;
	double monthlyIncome;
	double mortgage;
	double autoLoan;
	double otherDebt;
	double ratio;

	//Input Values
	System.out.println("What is your monthly income?");
		strMonthlyIncome = dataIn.readLine();
	System.out.println("What is the amount of your mortgage or rent?");
	System.out.println("Enter zero if you do not have a mortgage or pay rent.");
		strMortgage = dataIn.readLine();
	System.out.println("What is the amount of your auto loan?");
	System.out.println("Enter zero if you do not have an auto loan.");
		strAutoLoan = dataIn.readLine();
	System.out.println("What is the total amount of your other debts?");
	System.out.println("Enter zero if you have no other debt.");
		strOtherDebt = dataIn.readLine();

	//Conversions
	monthlyIncome = Double.parseDouble(strMonthlyIncome);
	mortgage = Double.parseDouble(strMortgage);
	autoLoan = Double.parseDouble(strAutoLoan);
	otherDebt = Double.parseDouble(strOtherDebt);

	//Calculations
	ratio = (mortgage + autoLoan + otherDebt) / monthlyIncome;

	//Output
	System.out.println("Your income to debt ratio is " + ratio);

   }
}