#t394. 砝码称重(weight)

砝码称重(weight)

Weights

Background

Special for beginners, ^_^

Problem Description

There are several weights of 1g,2g,3g,5g,10g,20g1g, 2g, 3g, 5g, 10g, 20g each (their total weight is ≤1000g\le 1000g).

Input Format

a1,a2,a3,a4,a5,a6a_1, a_2, a_3, a_4, a_5, a_6 (meaning there are a1a_1 weights of 1g1g, a2a_2 weights of 2g2g, …\dots, and a6a_6 weights of 20g20g).

Output Format

Total=N

(NN is the number of different weights that can be measured with these weights, but excluding the case where no weight is used at all.)

Sample Input 1

1 1 0 0 0 0

Sample Output 1

Total=3

Constraints

1s, 1024KiB for each test case.

This means the three different weights 1g,2g,3g1g, 2g, 3g can be measured.