{"raw_statement":[{"iden":"problem statement","content":"There is an octopus-shaped robot and $N$ treasures on a number line. The $i$\\-th treasure $(1\\leq i\\leq N)$ is located at coordinate $X_i$.  \nThe robot has one head and $N$ legs, and the $i$\\-th leg $(1\\leq i\\leq N)$ has a length of $L_i$.\nFind the number of **integers** $k$ such that the robot can grab all $N$ treasures as follows.\n\n*   Place the head at coordinate $k$.\n*   Repeat the following for $i=1,2,\\ldots,N$ in this order: if there is a treasure that has not been grabbed yet within a distance of $L_i$ from the head, that is, at a coordinate $x$ satisfying $k-L_i\\leq x\\leq k+L_i$, choose one such treasure and grab it."},{"iden":"constraints","content":"*   $1 \\leq N\\leq 200$\n*   $-10^{18} \\leq X_1<X_2<\\cdots<X_N\\leq 10^{18}$\n*   $1\\leq L_1\\leq L_2\\leq\\cdots\\leq L_N\\leq 10^{18}$\n*   All input values are integers."},{"iden":"input","content":"The input is given from Standard Input in the following format:\n\n$N$\n$X_1$ $X_2$ $\\ldots$ $X_N$\n$L_1$ $L_2$ $\\ldots$ $L_N$"},{"iden":"sample input 1","content":"3\n-6 0 7\n3 5 10"},{"iden":"sample output 1","content":"6\n\n$k=-3,-2,-1,2,3,4$ satisfy the condition. For example, when $k=-3$, the robot can grab all three treasures as follows.\n\n*   The first leg can grab treasures at coordinates $x$ satisfying $-6\\leq x\\leq 0$. Among them, grab the first treasure at coordinate $-6$.\n*   The second leg can grab treasures at coordinates $x$ satisfying $-8\\leq x\\leq 2$. Among them, grab the second treasure at coordinate $0$.\n*   The third leg can grab treasures at coordinates $x$ satisfying $-13\\leq x\\leq 7$. Among them, grab the third treasure at coordinate $7$."},{"iden":"sample input 2","content":"1\n0\n1000000000000000000"},{"iden":"sample output 2","content":"2000000000000000001\n\nAll integers $k$ from $-10^{18}$ to $10^{18}$ satisfy the condition."},{"iden":"sample input 3","content":"2\n-100 100\n1 1"},{"iden":"sample output 3","content":"0\n\nNo $k$ satisfies the conditions."}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}