{"trustable":false,"prependHtml":"\u003cstyle type\u003d\"text/css\"\u003e\n section pre {\n display: block;\n padding: 9.5px;\n margin: 0 0 10px;\n font-size: 13px;\n line-height: 1.42857143;\n word-break: break-all;\n word-wrap: break-word;\n color: #333;\n background: rgba(255, 255, 255, 0.5);\n border: 1px solid #ccc;\n border-radius: 6px;\n }\n\u003c/style\u003e\n\u003cscript\u003e\n window.katexOptions \u003d {\n delimiters: [\n {left: \u0027\\\\(\u0027, right: \u0027\\\\)\u0027, display: false},\n {left: \u0027\\\\[\u0027, right: \u0027\\\\]\u0027, display: true}\n ]\n };\n\u003c/script\u003e\n","sections":[{"title":"Problem Statement","value":{"format":"HTML","content":"\u003ch3\u003e\u003c/h3\u003e\n\u003cp\u003eThere is a staircase with \u003cvar\u003eN\u003c/var\u003e steps. Takahashi is now standing at the foot of the stairs, that is, on the \u003cvar\u003e0\u003c/var\u003e-th step. He can climb up one or two steps at a time.\u003c/p\u003e \n\u003cp\u003eHowever, the treads of the \u003cspan class\u003d\"tex-span\"\u003e\u003ci\u003ea\u003c/i\u003e\u003csub class\u003d\"lower-index\"\u003e\u003ci\u003e1\u003c/i\u003e\u003c/sub\u003e\u003c/span\u003e-th, \u003cspan class\u003d\"tex-span\"\u003e\u003ci\u003ea\u003c/i\u003e\u003csub class\u003d\"lower-index\"\u003e\u003ci\u003e2\u003c/i\u003e\u003c/sub\u003e\u003c/span\u003e-th, \u003cspan class\u003d\"tex-span\"\u003e\u003ci\u003ea\u003c/i\u003e\u003csub class\u003d\"lower-index\"\u003e\u003ci\u003e3\u003c/i\u003e\u003c/sub\u003e\u003c/span\u003e-th, ..., \u003cspan class\u003d\"tex-span\"\u003e\u003ci\u003ea\u003c/i\u003e\u003csub class\u003d\"lower-index\"\u003e\u003ci\u003eM\u003c/i\u003e\u003c/sub\u003e\u003c/span\u003e-th steps are broken, so it is dangerous to set foot on those steps.\u003c/p\u003e \n\u003cp\u003eHow many ways are there to climb up to the top step, that is, the \u003cvar\u003eN\u003c/var\u003e-th step, without setting foot on the broken steps? Find the count modulo 1000000007.\u003c/p\u003e\u003cscript defer src\u003d\u0027CDN_BASE_URL/74926ad0182dbb356381d53a4e4b1439?v\u003d1563475293\u0027\u003e\u003c/script\u003e\u003cscript defer src\u003d\u0027CDN_BASE_URL/1de9ac635832b17871587cdd2336341c?v\u003d1563475293\u0027\u003e\u003c/script\u003e\u003cscript defer src\u003d\u0027CDN_BASE_URL/c9c34e29d77252102cd6d6f257f3a667?v\u003d1563475293\u0027\u003e\u003c/script\u003e\u003cscript defer src\u003d\u0027CDN_BASE_URL/57b8c019c6e6f632d03c6077520eb5f6?v\u003d1563475293\u0027\u003e\u003c/script\u003e"}},{"title":"Constraints","value":{"format":"HTML","content":"\u003ch3\u003e\u003c/h3\u003e\n\u003cul\u003e \n \u003cli\u003e1 ≤ \u003cvar\u003eN\u003c/var\u003e ≤ \u003cspan class\u003d\"tex-span\"\u003e10\u003csup class\u003d\"upper-index\"\u003e5\u003c/sub\u003e\u003c/span\u003e\u003c/li\u003e \n \u003cli\u003e0 ≤ \u003cvar\u003eM\u003cvar\u003e ≤ \u003cvar\u003eN\u003c/var\u003e – 1\u003c/li\u003e \n \u003cli\u003e1 ≤ \u003cvar\u003e\u003cspan class\u003d\"tex-span\"\u003e\u003ci\u003ea\u003c/i\u003e\u003csub class\u003d\"lower-index\"\u003e\u003ci\u003e1\u003c/i\u003e\u003c/sub\u003e\u003c/span\u003e \u0026lt; \u003cspan class\u003d\"tex-span\"\u003e\u003ci\u003ea\u003c/i\u003e\u003csub class\u003d\"lower-index\"\u003e\u003ci\u003e2\u003c/i\u003e\u003c/sub\u003e\u003c/span\u003e \u0026lt; \u003c/var\u003e \u003cvar\u003e...\u003c/var\u003e \u003cvar\u003e \u0026lt; \u003cspan class\u003d\"tex-span\"\u003e\u003ci\u003ea\u003c/i\u003e\u003csub class\u003d\"lower-index\"\u003eM\u003c/sub\u003e\u003c/var\u003e\u003c/span\u003e ≤ \u003cvar\u003eN\u003c/var\u003e – 1\u003c/li\u003e \n\u003c/ul\u003e"}},{"title":"Input","value":{"format":"HTML","content":"\u003ch3\u003e\u003c/h3\u003e\n\u003cp\u003eInput is given from Standard Input in the following format:\u003c/p\u003e \n\u003cpre\u003e\u003cvar\u003eN\u003c/var\u003e \u003cvar\u003eM\u003c/var\u003e\n\u003cvar\u003e\u003cspan class\u003d\"tex-span\"\u003e\u003ci\u003ea\u003c/i\u003e\u003csub class\u003d\"lower-index\"\u003e\u003ci\u003e1\u003c/i\u003e\u003c/sub\u003e\u003c/span\u003e\u003c/var\u003e\n\u003cvar\u003e\u003cspan class\u003d\"tex-span\"\u003e\u003ci\u003ea\u003c/i\u003e\u003csub class\u003d\"lower-index\"\u003e\u003ci\u003e2\u003c/i\u003e\u003c/sub\u003e\u003c/span\u003e\u003c/var\u003e\n\u003cvar\u003e .\u003c/var\u003e\n\u003cvar\u003e .\u003c/var\u003e\n\u003cvar\u003e .\u003c/var\u003e\n\u003cvar\u003e\u003cspan class\u003d\"tex-span\"\u003e\u003ci\u003ea\u003c/i\u003e\u003csub class\u003d\"lower-index\"\u003e\u003ci\u003eM\u003c/i\u003e\u003c/sub\u003e\u003c/span\u003e\u003c/var\u003e\n\u003c/pre\u003e"}},{"title":"Output","value":{"format":"HTML","content":"\u003ch3\u003e\u003c/h3\u003e\n\u003cp\u003ePrint the number of ways to climb up the stairs under the condition, modulo 1000000007.\u003c/p\u003e"}},{"title":"Sample Input 1","value":{"format":"HTML","content":"\u003ch3\u003e\u003c/h3\u003e\n\u003cpre\u003e6 1\n3\n\u003c/pre\u003e"}},{"title":"Sample Output 1","value":{"format":"HTML","content":"\u003ch3\u003e\u003c/h3\u003e\n\u003cpre\u003e4\n\u003c/pre\u003e \n\u003cp\u003eThere are four ways to climb up the stairs, as follows:\u003c/p\u003e \n\u003cul\u003e \n \u003cli\u003e\u003cvar\u003e0 → 1 → 2 → 4 → 5 → 6\u003c/var\u003e\u003c/li\u003e \n \u003cli\u003e\u003cvar\u003e0 → 1 → 2 → 4 → 6\u003c/var\u003e\u003c/li\u003e \n \u003cli\u003e\u003cvar\u003e0 → 2 → 4 → 5 → 6\u003c/var\u003e\u003c/li\u003e \n \u003cli\u003e\u003cvar\u003e0 → 2 → 4 → 6\u003c/var\u003e\u003c/li\u003e \n\u003c/ul\u003e"}},{"title":"Sample Input 2","value":{"format":"HTML","content":"\u003ch3\u003e\u003c/h3\u003e\n\u003cpre\u003e10 2\n4\n5\n\u003c/pre\u003e"}},{"title":"Sample Output 2","value":{"format":"HTML","content":"\u003ch3\u003e\u003c/h3\u003e\n\u003cpre\u003e0\n\u003c/pre\u003e \n\u003cp\u003eThere may be no way to climb up the stairs without setting foot on the broken steps.\u003c/p\u003e"}},{"title":"Sample Input 3","value":{"format":"HTML","content":"\u003ch3\u003e\u003c/h3\u003e\n\u003cpre\u003e100 5\n1\n23\n45\n67\n89\n\u003c/pre\u003e"}},{"title":"Sample Output 3","value":{"format":"HTML","content":"\u003ch3\u003e\u003c/h3\u003e\n\u003cpre\u003e608200469\n\u003c/pre\u003e \n\u003cp\u003eBe sure to print the count modulo 1000000007.\u003c/p\u003e"}},{"title":"Template","value":{"format":"HTML","content":"\u003cpre\u003e\n\u003ccode\u003e\nfrom sys import stdin\n\nN, M \u003d (int(x) for x in stdin.readline().split())\nbroken_stairs \u003d [int(stdin.readline()) for i in range(M)]\nMOD \u003d int(1e9 + 7)\n\ndef solve(N, broken_stairs):\n # write your code here\n\n return 0\n\nprint(solve(N, broken_stairs))\n\u003c/pre\u003e\n\u003c/code\u003e"}}]}