P13975 [HackerEarth] Two kids are playing the following game: there are initially N cards and there is a non-negative integer written on the each card. They perform three steps:
提高
题目描述

Two kids are playing the following game: there are initially N cards and there is a non-negative integer written on the each card. They perform three steps:
The first player picks random card of the given N cards. Let's denote the number written on it as A.
The second player picks random card of the other N - 1 cards. Let's denote the number written on it as B.
If A equals B then, the game ends with a draw and nobody receives candies. Otherwise the game is finished. The kid with the greatest number is claimed as the winner and he gets |B - A| sweets.

You were watching your little son playing this game and noticed that there are not many outcomes of the game. So now you are interested in the following question: how many different values of |A-B| are possible?

Input
The first line contains one integer N.
The second line contains N non-negative integers - numbers written on cards.

Output
Output the one number - answer to the question.

Constraints
2 ≤ N ≤ 10^5
0 ≤ A[i] ≤ 10^5

SAMPLE INPUT
3
4 8 6

SAMPLE OUTPUT
2

Explanation

The winner can get 2 sweets if the chosen cards were 6 and 8 (or 4 and 6). He also can get 4 sweets if the numbers on the cards were 4 and 8.

输入格式

见题面

输出格式

见题面

样例输入
800 61942 76937 39235 36701 6445 67716 81007 99276 51121 74991 92279 59611 80543 64336 32858 7237 22826 62692 74145 7192 54310 79366 7737 43038 91915 43369 90471 78710 42147 62030 69688 16491 67196 28700 59088 65340 85043 63525 42792 5379 9263 96575 2302 31637 12751 47879 48022 56140 51425 46500 97276 38890 67163 96063 72872 55228 55882 59135 35535 33338 78679 3282 46082 34863 98540 96989 38861 36742 34174 58813 2198 11593 21772 23716 84380 58938 20625 44974 23496 88724 91535 94718 84287 27959 53506 42952 75181 24243 53502 99064 53829 38686 84306 727 80064 72776 80071 96363 12008 38423 80240 73327 19299 20735 67697 57001 26886 87343 13198 64754 69250 61050 78824 93953 78493 11296 6731 16891 43410 59402 75385 73617 71328 14315 9042 4461 56998 23889 26264 18248 57747 13795 21436 46565 70544 83087 80306 6649 98459 46291 78084 29366 87265 14482 98138 42134 36236 2686 10580 34489 98352 22540 57935 40736 33762 99543 52061 49887 50934 6677 95681 75528 47356 55432 82485 31042 47093 65318 73098 6015 51326 79915 94926 51321 54727 32806 52362 65395 99150 2897 89517 23669 75505 54080 60675 35212 3254 82841 30588 54332 16165 49251 99419 94075 23924 32774 33869 67937 59860 55538 12110 72075 55808 53800 49639 54462 1358 62443 28024 92750 23577 25697 58385 63216 56139 84772 21689 52814 23854 31236 9349 82604 25043 1168 30501 19536 55354 76222 29702 9764 67237 85955 43624 67570 65829 41485 56334 13457 43836 52714 91880 79720 83919 40767 81156 81054 77437 55020 66053 98945 26598 33220 41718 53713 99095 56093 63883 12255 93153 24130 38788 27110 14586 75776 66445 76710 86158 41322 38753 55530 42970 77751 63222 63758 5430 94657 381 95489 89593 90532 28474 60932 84925 90264 25185 37525 8990 32498 32095 17877 65717 69072 53064 10314 24156 27805 62985 95006 1806 64678 69800 89812 79306 62543 12169 64241 26383 53673 48963 67214 59181 69539 39083 83705 97103 26989 44212 79078 79618 27405 6729 96744 91786 16634 39655 95500 41308 90642 59771 73897 46949 72077 76597 41827 85930 43394 54655 80794 72018 36655 69438 6099 38078 17750 96445 52895 7179 44885 97972 17150 16113 83637 53085 58356 34203 57692 85438 74702 58899 68785 11508 77809 46105 11030 959 20709 40027 43598 29709 70619 16751 8212 60257 81275 61786 80627 97922 10051 42815 30745 70924 32926 2161 3273 11665 31968 44493 39038 64279 47897 17232 48659 46406 54805 64533 43745 32183 83071 36838 37286 54945 97197 84143 85505 102 33695 11572 18327 9309 80347 16971 87740 63938 61808 16867 66963 9944 27081 52717 10359 95822 3744 12528 93561 9049 36555 57843 48820 13765 72508 29219 42708 97119 52195 48608 65923 16816 29113 27996 2341 60740 3633 22857 37112 58097 86675 42236 37280 59020 7414 43165 21809 17801 17889 52322 93293 70535 3876 96351 86780 36683 83459 76266 4588 9973 68007 33708 68293 56314 15225 23414 65118 18009 34473 6204 83729 88720 8463 22909 60406 88064 80772 49292 88612 17081 72236 62238 80063 42679 24585 66752 37903 78898 87230 91309 75627 96411 32921 79393 90023 17046 16594 66093 14292 9551 47182 61902 14367 5817 78969 8123 36743 37562 9192 83082 93702 34773 42428 18726 4152 86460 46730 35986 28251 62472 47173 76346 61041 75724 12099 10920 13791 43231 18742 76824 41110 39004 1382 70145 96070 6865 62980 9751 45258 3918 72771 81368 21217 19912 17126 14626 37292 22131 299 61358 74266 27541 1826 72418 49675 47437 64443 1010 74817 97176 16828 87732 59946 64208 66330 53532 18989 45255 77844 9798 51885 62086 97400 54452 83486 11915 32450 28086 62530 45121 575 8110 67542 37358 78396 79825 82892 32526 22341 76599 88579 92025 22400 50693 60363 88786 68880 28405 51850 84011 60643 16760 1127 72304 59797 40847 40310 32108 44293 83033 82684 37855 46445 99101 22823 97608 87711 10216 83985 97762 37942 41493 52453 24535 30618 99513 87824 37809 79970 55188 17575 10973 25326 21077 93386 49050 53087 50859 93902 85458 21543 21467 48035 95762 22117 37397 33403 64803 19151 62214 53113 96873 14245 88182 83600 37243 90874 84388 33573 18278 26454 76251 52117 23618 76227 24507 9306 47523 93511 19620 69600 26058 54541 72375 63081 70182 57568 44159 45113 84139 81850 14681 53093 32774 5080 56600 17236 28601 98310 76949 77538 19120 79271 24310 7806 39188 92830 83025 8087 14948 38031 62512 46964 57180 46657 7147 9190 23772 66395 84646 85694 79357 35795 31792 51315 57513 80663 73703 1594 77290 33403 24014 76497 11190 27446 74501 87813 56857 12233 5126 77114 78818 30614 76823 13509 98470 55447 23700 54717 71731 81951 50611 37121 92276 55656 61326 5537 37862 91475 8829 1298 14530 24082 61086 41465 55706 15891 54482 47843 28317 82854 41745 77281 46850 515 81313 76503 22109 49816 64019 53317 11179 86748 8994 59921 81103 70336 31306 88195 93099 6035 56152 724 82859 50809 41722 98134 20143 61342 44448 59981 54422 72861 66914 23684
样例输出
33320