Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # -*- coding: utf-8 -*-
- a, b, c, d = [int(i) for i in input().split()]
- h = 1 if c < d else -1
- print (( (a + 2 * b) * (d - c - 1) + 2 * b) * h)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement