{"trustable":true,"prependHtml":"\u003cscript\u003e window.katexOptions \u003d { disable: true }; \u003c/script\u003e\n\u003cscript type\u003d\"text/x-mathjax-config\"\u003e\n MathJax.Hub.Config({\n tex2jax: {\n inlineMath: [[\u0027$$$\u0027,\u0027$$$\u0027], [\u0027$\u0027,\u0027$\u0027]],\n displayMath: [[\u0027$$$$$$\u0027,\u0027$$$$$$\u0027], [\u0027$$\u0027,\u0027$$\u0027]]\n }\n });\n\u003c/script\u003e\n\u003cscript async src\u003d\"https://mathjax.codeforces.org/MathJax.js?config\u003dTeX-AMS-MML_HTMLorMML\" type\u003d\"text/javascript\"\u003e\u003c/script\u003e","sections":[{"title":"","value":{"format":"HTML","content":"\n\u003cdiv class\u003d\"panel_content\"\u003e\nBeing away for a year, parents are always concerned.\n \u003cbr\u003e\nWhen returning home for the Spring Festival, can you be a good child for a few days?\n \u003cbr\u003e\nTry doing the following during the winter break.\n \u003cbr\u003e\n \u003cbr\u003e\nAccompany mom to the market once.\n \u003cbr\u003e\nQuietly buy a small gift for dad.\n \u003cbr\u003e\nInitiatively, strongly, request to wash the dishes.\n \u003cbr\u003e\nOne day, wake up early and make breakfast for parents with care.\n \u003cbr\u003e\n \u003cbr\u003e\nIf willing, you can also say to your parents,\n \u003cbr\u003e\n\"Let\u0027s play a little game, the ACM class taught us~\"\n \u003cbr\u003e\n \u003cbr\u003e\nHere is a two-player game: there are M piles of poker cards on the table; the number of cards in each pile is Ni (i\u003d1…M); the two players take turns; at each turn, you can choose any pile and take any number of cards from it; the game ends when all the poker cards on the table are taken; the person who takes the last card is the winner.\n \u003cbr\u003e\nNow we don\u0027t want to study whether going first is a win or a loss. I just want to ask everyone:\n \u003cbr\u003e\n —\"If the person going first wants to win, how many choices does he have for the first move?\"\n \u003cbr\u003e\n\u003c/div\u003e\n"}},{"title":"Input","value":{"format":"HTML","content":"The input data contains multiple test cases, each test case takes up 2 lines. First, a line containing an integer M (1\u003cM\u003c\u003d100), indicating the number of piles of poker cards. Followed by a line containing M integers Ni (1\u003c\u003dNi\u003c\u003d1000000, i\u003d1…M), indicating the quantity of poker cards in each pile. M being 0 indicates the end of input data.\n\u003cbr\u003e"}},{"title":"Output","value":{"format":"HTML","content":"If the person going first can win, please output the number of feasible options for their first move; otherwise, please output 0. Each instance\u0027s output occupies one line.\n\u003cbr\u003e"}},{"title":"Sample","value":{"format":"HTML","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e3\r\n5 7 9\r\n0\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e1\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e"}}]}