Problem B. Bonus points

Author:Антон Карабанов   Time limit:1 sec
Input file:Standard input   Memory limit:512 Mb
Output file:Standard output  

Statement

Oh, those math lessons! Today, for example was the fourth test on the subject. To those who finished ahead of time the teacher offered an extra task for bonus points.

Two n-digit numbers are written on the blackboard, first composed of only the digit d1, second — of only the digit d2. Determine which digit occupies position k in the sum of those numbers. Positions are numbered left to right starting from 1.

You want bonus points, don't you?

Input format

Four lines of input contain four integers: n, d1, d2 and k. It is guaranteed that k is correct.

Output format

Output a single decimal digit — answer to the problem.

Constraints

1 ≤ n ≤ 109

1 ≤ k ≤ n + 1

1 ≤ d1, d2 ≤ 9

Notes on sample

Sample has n = 2 (adding two-digit numbers), d1 = 5 (first number is 55), d2 = 8 (second number is 88). Sum is 55 + 88 = 143. k = 1 (teacher asks the first digit of the result). The digit at first position of the number 143 is 1.

Sample tests

No. Standard input Standard output
1
2
5
8
1
1

0.086s 0.027s 13