S = 1x2 + 2x3 + 3x4 + ... + 38x39 + 39x40
3S = 1x2x3 + 2x3x3 + 3x4x3 + ... + 38x39x3 + 39x40x3
3S = 1x2x3 + 2x3x(4-1) + 3x4x(5-2) + ... + 38x39x(40-37) + 39x40x(41-38)
3S = 1x2x3 + 2x3x4-1x2x3 + 3x4x5-2x3x4 + ... + 38x39x40-37x38x39 + 39x40x41-38x39x40
S = 39x40x41 : 3
S = 21320