Under construction

Still being built. Things may change

Busil wants to be friends

Interview

Time limit1sMemory limit1024 MB

Summary
Count how many values from A to B differ from K by at most X, and print IMPOSSIBLE if no value qualifies.
Level

Easy1 of 10

Topics
Intervals, Math
Solved
No attempts yet

Problem

Now that all of Busil's friends have become GOSU, Busil wants to make new friends with skill levels close to his own. Everywhere he looks, there are only GOSU, but Busil has managed to gather a few people at his level. Surprisingly, each of these people solved a different number of problems. When they are arranged in order of how many problems they solved, from fewest to most, the counts are A,A+1,⋯ ,BA, A+1, \cdots, B.

Some of them differ from Busil by too many problems. Busil decides that only people whose solved count differs from his by at most XX qualify as friends. When Busil has solved KK problems, find the number of people who can become his friends.

Input

The first line contains AA and BB, separated by a space. (1≤A≤B≤10 000)(1\le A \le B \le 10\,000)

The second line contains KK, the number of problems Busil solved, and a positive integer XX, separated by a space. (1≤K,X≤10 000)(1\le K, X \le 10\,000)

Output

Print the number of people who can be Busil's friends.

If no one can be his friend, print IMPOSSIBLE.

Examples2

  1. Example 1

    Input
    10 100
    50 10
    
    Expected output
    21
    
  2. Example 2

    Input
    25 75
    10 5
    
    Expected output
    IMPOSSIBLE