{"trustable":true,"sections":[{"title":"题目描述","value":{"format":"MD","content":"Everyone knows about the Fibonacci sequence, $f_1\u003d1,f_2\u003d1,f_3\u003d2,f_4\u003d3,…,f_n\u003df_{n-1}+f_{n-2}$.\n\nNow the problem is very simple, given $n$ and $m$, find the sum of the first $n$ terms and $S_n\\bmod m$."}},{"title":"输入格式","value":{"format":"MD","content":"Input $n,m$."}},{"title":"输出格式","value":{"format":"MD","content":"Output the sum of the first $n$ terms and $S_n\\bmod m$."}},{"title":"样例","value":{"format":"MD","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\u003e5 1000\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e12\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e"}},{"title":"数据范围与提示","value":{"format":"MD","content":"For the data of $100\\%$, $1\\le n \\le 2\\times 10^9, 1\\le m \\le 10^9+10$."}}]}