{"raw_statement":[{"iden":"problem statement","content":"We have a blackboard with nothing written on it. Takahashi will do $N$ operations to write integers on it.\nIn the $i$\\-th operation, he will write each integer from $A_i$ through $B_i$ once, for a total of $B_i - A_i + 1$ integers.\nFind the sum of the integers written on the blackboard after the $N$ operations."},{"iden":"constraints","content":"*   All values in input are integers.\n*   $1 \\leq N \\leq 10^5$\n*   $1 \\leq A_i \\leq B_i \\leq 10^6$"},{"iden":"input","content":"Input is given from Standard Input in the following format:\n\n$N$\n$A_1$ $B_1$\n$\\vdots$\n$A_N$ $B_N$"},{"iden":"sample input 1","content":"2\n1 3\n3 5"},{"iden":"sample output 1","content":"18\n\nIn the $1$\\-st operation, he will write $1$, $2$, and $3$ on the blackboard.\nIn the $2$\\-nd operation, he will write $3$, $4$, and $5$ on the blackboard.\nThe sum of the integers written is $1+2+3+3+4+5=18$."},{"iden":"sample input 2","content":"3\n11 13\n17 47\n359 44683"},{"iden":"sample output 2","content":"998244353"},{"iden":"sample input 3","content":"1\n1 1000000"},{"iden":"sample output 3","content":"500000500000"}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}