You are given $N$ baskets of gold coins, numbered from $1$ to $N$. In every basket except one, each gold coin weighs $w$ grams. In the single exceptional basket, each gold coin weighs $w - d$ grams and is therefore lighter than the others.
A wizard takes $1$ coin from Basket $1$, $2$ coins from Basket $2$, and so on, up to $N-1$ coins from Basket $N-1$. He takes no coins from Basket $N$. He then weighs all of the selected coins together and, from that single weighing, determines which of the $N$ baskets holds the lighter coins.
Emulate the wizard's computation.
The input consists of one or more lines; each line describes one instance of the problem. Each line contains four positive integers separated by single spaces. The first three are $N$, $w$, and $d$ as described above, and the fourth is the weight obtained by weighing the selected coins.
$N$ is at least $2$ and at most $8000$, $w$ is at most $30$, and $d$ is smaller than $w$.
For each instance, print a single line containing one integer: the number of the basket that holds the lighter coins.