Multiple Input Multiplication

Hey Guys,

I am a coding novice and can’t seem to figure this one out. I wonder if I lay out what calculation I am trying to do, someone might be able to help?

What I need to do is:

Input 1: Value * 1 = X1
Input 2: Value * 0.02 =X2
Input 3: Value * 1 = X3
Input 4: Value * 0.04 =X4

X1X2 = Y1
X3
X4 = Y2

Y1+Y2 = Y3

then,

Input 1: Value * 1 = X5
Input 2: Value * 0.14 =X6
Input 3: Value * 1 = X7
Input 4: Value * 0.15 =X8

X5X6 = Y4
X7
X8 = Y5

Y4+Y5 = Y6

Total = Y6-Y3

This is the input form, if it helps to visualise…

Thankyou!