LearnPy Hub
← Variables problems
Medium

Running Total

Start a variable total at the first number. Then add the second, then subtract the third, then multiply by the fourth. Print total after each step (4 lines).

Input

Four integers on separate lines.

Output

Four lines.

Sample 1

Input
5
3
2
10
Output
5
8
6
60

Sample 2

Input
0
0
0
0
Output
0
0
0
0
solution.py
Output appears here
Running Total · Python practice problem · LearnPy Hub