#t279. 砝码称重
砝码称重
Weight Measurement
Problem Background
Special for beginners, ^_^
Problem Description
Suppose there are several weights of , , , , , each (their total weight is at most ). Compute how many different weights can be measured using these weights, excluding the case of using no weight at all.
Input Format
One line containing six positive integers , meaning there are weights of , of , ..., of . Adjacent integers are separated by a single space.
Output Format
Output in the form Total=N, where is the number of different weights that can be measured.
Sample Input
1 1 0 0 0 0
Sample Output
Total=3
Hint
The sample's weights can measure , , — three different weights.
Note: the prefix Total= must be printed exactly as shown, followed directly by the integer .
Constraints
Time limit: 1s, memory limit: 1024KiB for each test case.