40 x 16
double the first and 1/2 the second
80 x 8
double the first and 1/2 the second
160 x 4
double the first and 1/2 the second
320 x 2
double the first and 1/2 the second
640 x 1 = 640.
--
If you meant something like (40)*(10+5+1)
then distribute the 40 to get
400 + 200 + 40
which equals 640.