{"trustable":false,"prependHtml":"\u003cstyle type\u003d\u0027text/css\u0027\u003e\n .input, .output {\n border: 1px solid #888888;\n }\n .output {\n margin-bottom: 1em;\n position: relative;\n top: -1px;\n }\n .output pre, .input pre {\n background-color: #EFEFEF;\n line-height: 1.25em;\n margin: 0;\n padding: 0.25em;\n }\n \u003c/style\u003e\n \u003clink rel\u003d\"stylesheet\" href\u003d\"//codeforces.org/s/96598/css/problem-statement.css\" type\u003d\"text/css\" /\u003e\n\u003cscript\u003e\n window.katexOptions \u003d {\n delimiters: [\n {left: \u0027$$$$$$\u0027, right: \u0027$$$$$$\u0027, display: true},\n {left: \u0027$$$\u0027, right: \u0027$$$\u0027, display: false},\n {left: \u0027$$\u0027, right: \u0027$$\u0027, display: true},\n {left: \u0027$\u0027, right: \u0027$\u0027, display: false}\n ]\n };\n\u003c/script\u003e\n","sections":[{"title":"","value":{"format":"HTML","content":"\u003cp\u003ePolycarpus plays with red and blue marbles. He put \u003cspan class\u003d\"tex-span\"\u003e\u003ci\u003en\u003c/i\u003e\u003c/span\u003e marbles from the left to the right in a row. As it turned out, the marbles form a \u003cspan class\u003d\"tex-font-style-it\"\u003ezebroid\u003c/span\u003e.\u003c/p\u003e\n\u003cp\u003eA non-empty sequence of red and blue marbles is a \u003cspan class\u003d\"tex-font-style-it\"\u003ezebroid\u003c/span\u003e, if the colors of the marbles in this sequence alternate. For example, sequences (\u003cspan class\u003d\"tex-font-style-tt\"\u003ered; blue; red\u003c/span\u003e) and (\u003cspan class\u003d\"tex-font-style-tt\"\u003eblue\u003c/span\u003e) are zebroids and sequence (\u003cspan class\u003d\"tex-font-style-tt\"\u003ered; red\u003c/span\u003e) is not a zebroid.\u003c/p\u003e\n\u003cp\u003eNow Polycarpus wonders, how many ways there are to pick a zebroid \u003cspan class\u003d\"tex-font-style-bf\"\u003esubsequence\u003c/span\u003e from this sequence. Help him solve the problem, find the number of ways modulo \u003cspan class\u003d\"tex-span\"\u003e1000000007\u003c/span\u003e \u003cspan class\u003d\"tex-span\"\u003e(10\u003csup class\u003d\"upper-index\"\u003e9\u003c/sup\u003e + 7)\u003c/span\u003e.\u003c/p\u003e\n\u003chr/\u003e\n\u003cp\u003ePolycarpus 在玩红色和蓝色的弹珠。他把 $n$ 粒弹珠从左向右放成一行,并且形成了“斑马状”。\u003c/p\u003e\n\u003cp\u003e我们定义一个由“红”、“蓝”组成的非空序列是“斑马状”的,当且仅当它的颜色是相互交替的(每对相邻元素都是不同的)。\u003c/p\u003e\n\u003cp\u003e现在 Polycarpus 想知道,对于一个长度为 $n$ 的已经是“斑马状”的非空序列,有多少子序列的取法满足取出的子序列依然是“斑马状”的?\u003c/p\u003e"}},{"title":"Input","value":{"format":"HTML","content":"\u003cp\u003eThe first line contains a single integer \u003cspan class\u003d\"tex-span\"\u003e\u003ci\u003en\u003c/i\u003e\u003c/span\u003e \u003cspan class\u003d\"tex-span\"\u003e(1 ≤ \u003ci\u003en\u003c/i\u003e ≤ 10\u003csup class\u003d\"upper-index\"\u003e6\u003c/sup\u003e)\u003c/span\u003e — the number of marbles in Polycarpus\u0027s sequence.\u003c/p\u003e"}},{"title":"Output","value":{"format":"HTML","content":"\u003cp\u003ePrint a single number — the answer to the problem modulo \u003cspan class\u003d\"tex-span\"\u003e1000000007\u003c/span\u003e \u003cspan class\u003d\"tex-span\"\u003e(10\u003csup class\u003d\"upper-index\"\u003e9\u003c/sup\u003e + 7)\u003c/span\u003e.\u003c/p\u003e"}},{"title":"Sample 1","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\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e6\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}},{"title":"Sample 2","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\u003e4\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e11\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}},{"title":"Note","value":{"format":"HTML","content":"\u003cp\u003eLet\u0027s consider the first test sample. Let\u0027s assume that Polycarpus initially had sequence (\u003cspan class\u003d\"tex-font-style-tt\"\u003ered; blue; red\u003c/span\u003e), so there are six ways to pick a zebroid: \u003c/p\u003e\n\u003cul\u003e \n \u003cli\u003e pick the first marble; \u003c/li\u003e\n \u003cli\u003e pick the second marble; \u003c/li\u003e\n \u003cli\u003e pick the third marble; \u003c/li\u003e\n \u003cli\u003e pick the first and second marbles; \u003c/li\u003e\n \u003cli\u003e pick the second and third marbles; \u003c/li\u003e\n \u003cli\u003e pick the first, second and third marbles. \u003c/li\u003e\n\u003c/ul\u003e\n\u003cp\u003eIt can be proven that if Polycarpus picks (\u003cspan class\u003d\"tex-font-style-tt\"\u003eblue; red; blue\u003c/span\u003e) as the initial sequence, the number of ways won\u0027t change.\u003c/p\u003e"}}]}