B. Make Numbers
time limit per test
1 second
memory limit per test
1024 megabytes
input
standard input
output
standard output
Examples
Input
1 1 1 1
Output
15
Input
1 1 2 1
Output
32