3

a
4
b

2
c
3

The given input can be organized as follows:

a = 3
b = 4
c = -2
d = 3