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 PHP7 (7.0.15) (judge verdict: Time Limit Exceeded)

<?php

$diff = [];
$input = explode(' ', trim(fgets(STDIN)));

$n = (int)$input[0];

$count = 0;
while(true){
	$input = explode(' ', trim(fgets(STDIN)));
	foreach ($input as $value) {
		if ($value !== '') {
			$diff[] = $count + 1 - (int)$value;
			++$count;
		}
		if (count($diff) >= $n) {
			break;
		}
	}
	if (count($diff) >= $n) {
		break;
	}
}

// $diff = [];
// for ($i=0; $i < $n; $i++) { 
// 	$diff[] = $i+1-$args[$i];
// }

$result = 0;
for ($i=0; $i < $n; $i++) { 
	$tmp = $diff[$i];
	if ($tmp !== 0) {
		continue;
	}
	if ($i === $n - 1 && $tmp === 0) {
		++$result;
		break;
	}
	if ($diff[$i+1] !== 1) {
		++$result;
		$diff[$i+1] -= 1;
	}
}
echo $result;