D. Draconis Subarrays
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output

Once upon a time in the mystical land of Draconis, there existed two powerful arrays: $$$M$$$ and $$$N$$$. These arrays were filled with positive integers, each carrying its own magical essence. The inhabitants of the land were intrigued by the concept of similarity between arrays. They discovered that two arrays, $$$M$$$ and $$$N$$$, could be considered similar if it was possible to transform a subarray of $$$N$$$ into $$$M$$$ by adding or subtracting a constant value to each element.

You are now summoned to solve a puzzle. Given two arrays, $$$M$$$ and $$$N$$$, your task is to determine the number of subarrays of $$$N$$$ that are similar to $$$M$$$. Will you be able to unravel this mystical connection?

Input

The input consists of multiple lines. The first line contains two integers $$$M$$$ and $$$N$$$ $$$(1 \leq M \leq N \leq 10^6)$$$, representing the lengths of arrays $$$M$$$ and $$$N$$$ respectively. The second line contains $$$M$$$ space-separated positive integers $$$m_1, m_2, \ldots, m_M$$$ $$$(1 \leq m_i \leq 10^9)$$$, representing the magical elements of array $$$M$$$. The third line contains $$$N$$$ space-separated positive integers $$$n_1, n_2, \ldots, n_N$$$ $$$(1 \leq n_i \leq 10^9)$$$, representing the mystical elements of array $$$N$$$.

Output

Output a single integer, the number of subarrays of $$$N$$$ that are similar to $$$M$$$.

Examples
Input
4 6
1 2 3 4
10 11 12 13 14 15
Output
3
Input
3 10
1 1 1
2 2 2 3 3 3 4 4 4 4
Output
4
Input
2 6
5 8
10 12 1 4 3 9
Output
1
Note

A subarray is defined as a contiguous sequence of elements within an array.