Problem:
Score : 100 points

Problem Statement

We have a sandglass that runs for X seconds. The sand drops from the upper bulb at a rate of 1 gram per second. That is, the upper bulb initially contains X grams of sand.

How many grams of sand will the upper bulb contains after t seconds?

Constraints

1≤X≤10^9

1≤t≤10^9

X and t are integers.

Input

The input is given from Standard Input in the following format:

X t

Output

Print the number of sand in the upper bulb after t second.

Sample Input 1

100 17

Sample Output 1

83

17 out of the initial 100 grams of sand will be consumed, resulting in 83 grams.

Sample Input 2

48 58

Sample Output 2

0

All 48 grams of sand will be gone, resulting in 0 grams.

Sample Input 3

1000000000 1000000000

Sample Output 3

0

Solution in Java (OpenJDK 11.0.6) (judge verdict: Runtime Error)

import java.util.Scanner;

public class Main
{
	static int[] A;
	
	static boolean isValid()
	{
		for (int i = 0; i < A.length; i++)
		{
			if (A[i] == i + 1) return false;
		}
		return true;
	}
	
	public static void main(String[] Arguments)
	{
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		A = new int[N];
		for (int i = 0; i < N; i++)
		{
			A[i] = sc.nextInt();
		}
		int count = 0;
		while (!isValid())
		{
			for (int i = 0; i < A.length - 1; i++)
			{
				if (A[i] == i + 1)
				{
					count++;
					int temp = A[i];
					A[i] = A[i + 1];
					A[i + 1] = temp;
				}
			}
			if (A[A.length - 1] == A.length)
			{
				int temp = A[A.length - 1];
				A[A.length - 1] = A[A.length - 2];
				A[A.length - 2] = temp;
			}
		}
		System.out.println(count);
	}
}