Testing Round 8


A. IQ Test
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
836 624 412 200
Output
-12
Input
1 334 667 1000
Output
1333
----------------------------------------------------------------------------------------------------
B. Sheldon and Ice Pieces
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
42
23454
Output
2
Input
169
12118999
Output
1
----------------------------------------------------------------------------------------------------
