{"trustable":false,"sections":[{"title":"","value":{"format":"HTML","content":"\u003ch4 align\u003d\"center\"\u003e\r\n\tTime Limit: 1 second\u003c/h4\u003e\r\n\u003ch4 align\u003d\"center\"\u003e\r\n\tMemory Limit: 1 Mb\u003c/h4\u003e\r\n\u003cdiv\u003e\r\n\t\u0026nbsp;\u003c/div\u003e\r\n\u003cp\u003e\r\n\tAs Manuel wants to get rich fast and without too much work, he decided to make a career in gambling. Initially, he plans to study the gains and losses of players, so that, he can identify patterns of consecutive wins and elaborate a win-win strategy. But Manuel, as smart as he thinks he is, does not know how to program computers. So he hired you to write programs that will assist him in elaborating his strategy.\u003c/p\u003e\r\n\u003cp\u003e\r\n\tYour first task is to write a program that identifies the maximum possible gain out of a sequence of bets. A bet is an amount of money and is either winning (and this is recorded as a positive value), or losing (and this is recorded as a negative value).\u003c/p\u003e"}},{"title":"Input","value":{"format":"HTML","content":"\u003cp\u003e\r\n\tThe input set consists of a positive number\u0026nbsp;\u003cb\u003eN \u0026le; 10000\u003c/b\u003e\u0026nbsp;, that gives the length of the sequence, followed by\u0026nbsp;\u003cb\u003eN\u003c/b\u003e\u0026nbsp;integers. Each bet is an integer greater than\u0026nbsp;\u003cb\u003e0\u003c/b\u003e\u0026nbsp;and less than\u0026nbsp;\u003cb\u003e1000\u003c/b\u003e.\u003c/p\u003e\r\n\u003cp\u003e\r\n\tThe input is terminated with\u0026nbsp;\u003cb\u003eN \u003d 0\u003c/b\u003e.\u003c/p\u003e"}},{"title":"Output","value":{"format":"HTML","content":"\u003cp\u003e\r\n\tFor each given input set, the output will echo a line with the corresponding solution. If the sequence shows no possibility to win money, then the output is the message \u0026quot;Losing streak.\u0026quot;\u003c/p\u003e"}},{"title":"Sample Input","value":{"format":"HTML","content":"\u003cpre\u003e\r\n5\r\n12 -4 \r\n-10 4 \r\n9\r\n3\r\n-2 -1 -2\r\n0\u003c/pre\u003e"}},{"title":"Sample Output","value":{"format":"HTML","content":"\u003cpre\u003e\r\nThe maximum winning streak is 13.\r\nLosing streak.\u003c/pre\u003e"}}]}