#P10518. Prize Distribution
Prize Distribution
Prize Distribution
Little Xi is preparing to distribute prizes. She has volunteers, single-person teams, double-person teams, and triple-person teams. Specifically, she has \(a\) volunteers, \(b\) single-person teams, \(c\) double-person teams, and \(d\) triple-person teams. Each individual in these groups will receive exactly one prize. Determine the total number of prizes that need to be distributed.
inputFormat
The input consists of a single line containing four space-separated integers: \(a\), \(b\), \(c\), \(d\).
outputFormat
Output a single integer representing the total number of prizes to be distributed. The formula is:
\(\text{total} = a + b + 2\times c + 3\times d\)
sample
1 1 1 1
7