#K66857. Calculate Finisher Medal Qualifiers

    ID: 32513 Type: Default 1000ms 256MiB

Calculate Finisher Medal Qualifiers

Calculate Finisher Medal Qualifiers

In many marathon events, participants register in various categories. In this problem, you are provided with four integers:

  • n: the total number of registrants
  • v: the number of volunteers
  • r: the number of registered runners
  • d: the minimum qualifying distance in kilometers

Although the minimum qualifying distance, denoted by $d$, is given, all registered runners are assumed to complete the race. Therefore, the number of participants who qualify for a finisher's medal is exactly the number of registered runners, r.

Your task is to read the input from stdin and output the number of medal qualifiers to stdout.

inputFormat

The input consists of a single line containing four space-separated integers: n (total registrants), v (volunteers), r (registered runners), and d (minimum qualifying distance in kilometers).

outputFormat

Output a single integer representing the number of participants who qualify for the finisher's medal.

## sample
100 10 90 5
90

</p>