IMO 1977 SL 15

The length of a finite sequence is defined as the number of

IMO 1977 SL 15

Origin: VIE

Problem

The length of a finite sequence is defined as the number of terms of this sequence. Determine the maximal possible length of a finite sequence that satisfies the following condition: The sum of each seven successive terms is negative, and the sum of each eleven successive terms is positive.