{"raw_statement":[{"iden":"problem statement","content":"You are given an integer sequence of length $N$, $a =$ {$a_1, a_2, …, a_N$}, and an integer $K$.\n$a$ has $N(N+1)/2$ non-empty contiguous subsequences, {$a_l, a_{l+1}, …, a_r$} $(1 ≤ l ≤ r ≤ N)$. Among them, how many have an arithmetic mean that is greater than or equal to $K$?"},{"iden":"constraints","content":"*   All input values are integers.\n*   $1 ≤ N ≤ 2 \\times 10^5$\n*   $1 ≤ K ≤ 10^9$\n*   $1 ≤ a_i ≤ 10^9$"},{"iden":"input","content":"Input is given from Standard Input in the following format:\n\n$N$ $K$\n$a_1$\n$a_2$\n$:$\n$a_N$"},{"iden":"sample input 1","content":"3 6\n7\n5\n7"},{"iden":"sample output 1","content":"5\n\nAll the non-empty contiguous subsequences of $a$ are listed below:\n\n*   {$a_1$} = {$7$}\n*   {$a_1, a_2$} = {$7, 5$}\n*   {$a_1, a_2, a_3$} = {$7, 5, 7$}\n*   {$a_2$} = {$5$}\n*   {$a_2, a_3$} = {$5, 7$}\n*   {$a_3$} = {$7$}\n\nTheir means are $7$, $6$, $19/3$, $5$, $6$ and $7$, respectively, and five among them are $6$ or greater. Note that {$a_1$} and {$a_3$} are indistinguishable by the values of their elements, but we count them individually."},{"iden":"sample input 2","content":"1 2\n1"},{"iden":"sample output 2","content":"0"},{"iden":"sample input 3","content":"7 26\n10\n20\n30\n40\n30\n20\n10"},{"iden":"sample output 3","content":"13"}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}