gahui and sousenkyo 1

아직 제출이 없습니다시간 제한1초메모리 제한512 MB

문제

Gahui is watching the annual character election. After the election, The top 16 characters receive enormous benefits for one year because they belong to the Tier 1 (ranked 1st - 16th) section. For that reason, fans vote passionately to get their favorite characters into the top 16. Remarkably, at least one Cinderella appears in every election, achieving an outstanding outcome.

The competition rate of election is defined as the number of characters that satisfy the conditions below:

  • The character does not belong to the Tier 1 section.
  • The difference in votes between the character and the 16th-ranked character is $1\,000$ or less.

Find the competition rate of the election.

입력

Votes from the 16th-ranked character to the 20th-ranked character are given, separated by spaces.

출력

Print the answer to the question.

제한

  • There are equal to or more than $1\,000$ votes difference between the ranked 16th and 20th character votes.
  • No two characters received the same number of votes.
  • $30\,000 \lt \text{Number of votes from ranked }16\text{th character to ranked }20\text{th character} \le 45\,000$.