ATM java- NZEC error

import java.io.*;

public class Main {

/**
 * @param args
 */
public static void main(String[] args) throws java.lang.Exception{
	// TODO Auto-generated method stub
	BufferedReader r = new BufferedReader(new InputStreamReader(System.in));
	String input = r.readLine();
	String[] parts = input.split(" ");
	String first = parts[0];
	String second = parts[1];
	
	int withdrawal = Integer.parseInt(first);
	int balance = Integer.parseInt(second);
	
	if (withdrawal % 5 != 0 || (double)withdrawal + .5 > balance)
		System.out.printf("%.2f",balance);
	
	else
		System.out.printf("%.2f",(double)balance - withdrawal + .5);
}

}

Please note input format

30 120.00

here 30 is integer so you can store in withdrawal(int variable)
but 120.00 is float(or double) type so you can not convert into integer by Integer.parseInt()

Integer.parseInt() produces error when this function convert anything other than integer

use Float.parseFloat() function to convert into float

float balance=Float.parseFloat(second);