Vus the Cossack has two binary strings, that is, strings that consist only of "0" and "1". We call these strings $a$ and $b$. It is known that $|b| \leq |a|$, that is, the length of $b$ is at most the length of $a$.

The Cossack considers every substring of length $|b|$ in string $a$. Let's call this substring $c$. He matches the corresponding characters in $b$ and $c$, after which he counts the number of positions where the two strings are different. We call this function $f(b, c)$.

For example, let $b = 00110$, and $c = 11000$. In these strings, the first, second, third and fourth positions are different.

Vus the Cossack counts the number of such substrings $c$ such that $f(b, c)$ is even.

For example, let $a = 01100010$ and $b = 00110$. $a$ has four substrings of the length $|b|$: $01100$, $11000$, $10001$, $00010$.  $f(00110, 01100) = 2$; $f(00110, 11000) = 4$; $f(00110, 10001) = 4$; $f(00110, 00010) = 1$. 

Since in three substrings, $f(b, c)$ is even, the answer is $3$.

Vus can not find the answer for big strings. That is why he is asking you to help him.


-----Input-----

The first line contains a binary string $a$ ($1 \leq |a| \leq 10^6$) — the first string.

The second line contains a binary string $b$ ($1 \leq |b| \leq |a|$) — the second string.


-----Output-----

Print one number — the answer.


-----Examples-----
Input
01100010
00110

Output
3

Input
1010111110
0110

Output
4



-----Note-----

The first example is explained in the legend.

In the second example, there are five substrings that satisfy us: $1010$, $0101$, $1111$, $1111$.

Difficulty: interview

Starter code:

Solutions:
# AC
import sys
sys.setrecursionlimit(1000000)


class Main:
    def __init__(self):
        self.buff = None
        self.index = 0

    def __next__(self):
        if self.buff is None or self.index == len(self.buff):
            self.buff = self.next_line()
            self.index = 0
        val = self.buff[self.index]
        self.index += 1
        return val

    def next_line(self):
        return sys.stdin.readline().split()

    def next_ints(self):
        return [int(x) for x in sys.stdin.readline().split()]

    def next_int(self):
        return int(next(self))

    def solve(self):
        a = next(self)
        b = next(self)
        d = 0
        g = 0
        for i in range(len(b)):
            if a[i] != b[i]:
                d += 1
            if i > 0 and b[i] != b[i - 1]:
                g += 1
        ans = 1 if d % 2 == 0 else 0
        for i in range(len(b), len(a)):
            if a[i] != b[-1]:
                d += 1
            if a[i - len(b)] != b[0]:
                d += 1
            d += g
            if d % 2 == 0:
                ans += 1
        print(ans)


def __starting_point():
    Main().solve()

__starting_point()

a = input()
b = input()
c = 0
for i in range(1, len(b)):
    if b[i] != b[i-1]:
        c += 1
s = 0
for i in range(len(b)):
    if a[i]!=b[i]:
        s += 1
ans = int(s&1==0)
for i in range(len(a)-len(b)):
    s += c
    if a[i] != b[0]:
        s += 1
    if a[i+len(b)] != b[-1]:
        s += 1
    ans += int(s&1==0)
print(ans)




from functools import reduce
from operator import xor
a = [*map(int, input())]
b = [*map(int, input())]
n = len(b)
curr = reduce(xor, b)
curr ^= reduce(xor, a[:n])
res = int((curr & 1) == 0)
for i in range(n, len(a)):
    curr ^= a[i] ^ a[i - n]
    res += (curr & 1) == 0
print(res)

a = input()
b = input()
i = b.count("1")
s = [0 for k in range(len(a))]
if a[0] == "1":
    s[0] = 1
for k in range(1,len(a)):
    if a[k] == "1":
        s[k] = s[k-1] + 1
    else:
        s[k] = s[k-1]
s = s + [0]
ans = 0

for k in range(len(a)-len(b)+1):
    t = s[k+len(b)-1] - s[k-1]
    if i%2 == t%2:
        ans += 1
print(ans)


import sys
from math import floor, ceil

IS_LOCAL = False


def read_one(dtype=int):
    return dtype(input())


def read_multiple(f, dtype=int):
    return f(list(map(dtype, input().split())))


def main():
    a = '01100010'
    b = '00110'

    if not IS_LOCAL:
        a = input()
        b = input()

    def cst(x):
        return 0 if x == '0' else 1

    def rsum(arr):
        return sum(map(cst, arr))

    sb, lb = rsum(b), len(b)
    s = None
    res = 0
    for i in range(lb - 1, len(a)):
        if s is None:
            s = rsum(a[:lb])
        else:
            s = s - cst(a[i - lb]) + cst(a[i])

        if (s - sb) % 2 == 0:
            res += 1

    print(res)


def __starting_point():
    if len(sys.argv) > 1 and sys.argv[1] == 'True':
        IS_LOCAL = True
    main()

__starting_point()

a = str(input())
b = str(input())
n = len(a)
unos = [0] * (n+1)
m = len(b)

tot = 0
for el in b:
    tot += int(el)

tot = tot % 2

s = 0
c = 0
for r in range(1,n+1):
    s += int(a[r-1])
    unos[r] = s
    if r >= m and (unos[r] - unos[r-m]) % 2 == tot:
        c += 1
print(c)

import sys
input = sys.stdin.readline

a=input().strip()
b=input().strip()

C1=b.count("1")

L=len(b)
C0=(L-a[:L].count("0")+C1)%2

ANS=0
if C0%2==0:
    ANS+=1

for i in range(L,len(a)):
    if a[i]=="0":
        C0+=1
    if a[i-L]=="0":
        C0-=1

    if C0%2==0:
        ANS+=1

print(ANS)
    


a=input()
b=input()
A=[0]
Hash=0
for i in a:
    if i=='1':
        A.append(A[-1]+1)
    else:
        A.append(A[-1])
for i in b:
    if i=='1':
        Hash+=1
res=0
for i in range(1,len(a)-len(b)+2):
    if ((A[i+len(b)-1]-A[i-1])%2)==(Hash%2):
        res+=1
print(res)

a=[int(x) for x in list(input())]
b=[int(x) for x in list(input())]
n=len(b)
counter=odd=answer=0
for i in range(n):
    if a[i]!=b[i]:
        counter+=1
    if i!=n-1 and a[i]!=a[i+1]:
        odd+=1
if counter%2==0:
    flag=True
    answer+=1
else:
    flag=False
odd%=2
for i in range(n,len(a)):
    if a[i]!=a[i-1]:
        odd+=1
        odd=odd%2
    if odd==0:
        if flag:
            answer+=1
    else:
        if flag:
            flag=False
        else:
            answer+=1
            flag=True
    if a[i-n]!=a[i-n+1]:
        odd+=1
        odd%=2
print(answer)



a = input()
b = input()
pref = [0] * (len(a) - 1)
pyk = 0
for i in range(len(a) - 1):
	if a[i] != a[i + 1]:
		pyk += 1
		pref[i] = pyk
	else:
		pref[i] = pyk
chuj = 0
res = 0
for i in range(len(b)):
	if a[i] != b[i]:
		chuj += 1
tesame = 1
dupa = 1
for i in range(len(a) - len(b)):
	if i > 0:
		if (pref[i + len(b) - 1] - pref[i - 1]) % 2 != 0:
			dupa = 1 - dupa
		tesame += dupa
	else:
		if (pref[i + len(b) - 1]) % 2 != 0:
			dupa = 1 - dupa
		tesame += dupa
if chuj % 2 == 0:
	print(tesame)
else:
	print( len(a) - len(b) + 1 - tesame)

a = input()
b = input()
x = b.count('1') % 2

pref = [0] * (len(a) + 1)
for i in range(len(a)):
    if a[i] == '0':
        pref[i] = pref[i - 1]
    else:
        pref[i] = pref[i - 1] + 1

ans = 0
for i in range(len(a) - len(b) + 1):
    if (pref[i + len(b) - 1] - pref[i - 1]) % 2 == x:
        ans += 1
print(ans)
    
        


# @author 

import sys

class CVusTheCossackAndStrings:
    def solve(self):
        a = input().strip()
        b = input().strip()
        n = len(a)
        m = len(b)
        oa = 0
        ob = b.count('1')
        ans = 0
        for i in range(n):
            if a[i] == '1':
                oa += 1
            if i == m - 1:
                if abs(oa - ob) % 2 == 0:
                    ans += 1
            elif i >= m:
                if a[i - m] == '1':
                    oa -= 1
                if abs(oa - ob) % 2 == 0:
                    ans += 1
                    

        print(ans)

solver = CVusTheCossackAndStrings()
input = sys.stdin.readline

solver.solve()


a = input()
b = input()
n = len(a)
m = len(b)

def change(a):
    pref = [0] * (len(a))
    for i in range(1, len(a)):
        pref[i] = pref[i - 1] + (a[i] != a[i - 1])
    return pref

equals = 0
pref = change(a)
for i in range(m):
    equals += (a[i] != b[i])
parity = equals % 2
f = int(not parity)
for i in range(m, n):
    parity += (pref[i] - pref[i - m]) % 2
    f += (parity % 2 == 0)
print(f)

r=input()
n=input()
length=len(n)
g=n.count("1")
same=False
nums=0
if len(r)<length:
    print(0)
else:
    if (r[:len(n)].count("1")-g) % 2 == 0:
        same=True
        nums+=1
    for i in range(len(r)-len(n)):
        if r[i]!=r[i+len(n)]:
            same= not same
        if same:
            nums+=1
print(nums)

a = input()
b = input()

sum_a = sum(map(int, a[:len(b)]))
sum_b = sum(map(int, b))

count = 0
i = 0
while True:
    xor = (sum_a + sum_b + 1) % 2
    count += xor

    if i >= len(a) - len(b):
        break
    sum_a = sum_a + int(a[i + len(b)]) - int(a[i])
    i += 1

print(count)




a=input()
b=input()
A=[]
al=len(a)
bl=len(b)
A.append(0)
count=0
for x in a:
    if x=='1':
        count+=1
    A.append(count)
evencount=0
bcount=0
for x in b:
    if x=='1':
        bcount+=1
for i in range((al+1)-bl):
    acount=A[i+bl]-A[i]
    if (acount%2)==(bcount%2):
        evencount+=1
print(evencount)



A = input()

B = input()

B_zeros = 0

for i in range(len(B)):
    if B[i]=='0':
        B_zeros += 1


L_B = len(B)
zeros = 0
res = 0
for i in range(len(A)):
    if A[i]=='0':
        zeros += 1
        
    if i==L_B-1:
        do = 1
    elif i>L_B-1:
        if A[i-L_B]=='0':
            zeros -= 1
    
    if i>=L_B-1:
        if (zeros-B_zeros)%2==0:
            res += 1
        #print(zeros,L_B-zeros)
        
print(res)

s1 = input()
s2 = input()
n, m = len(s1), len(s2)
t, res = 0, [0, 0]
for i in range(m):
    t ^= (s1[i] == '0')
    t ^= (s2[i] == '0')
res[t] += 1
for i in range(m, n):
    t ^= (s1[i] == '0') ^ (s1[i-m] == '0')
    res[t] += 1
print(res[0])


from sys import stdin

def solve():
    #stdin = open("C.txt")

    a = stdin.readline().strip()
    b = stdin.readline().strip()
    
    n = len(a)
    m = len(b)
    
    a_cnt = a[:m].count("1")
    b_cnt = b.count("1")
    
    ans = 0
    
    if (a_cnt + b_cnt) % 2 == 0:
        ans = 1
    
    for i in range(1,n-m+1):
        if a[i-1] == "1":
            a_cnt -= 1
        
        if a[i+m-1] == "1":
            a_cnt += 1
            
        if (a_cnt + b_cnt) % 2 == 0:
            ans += 1

    print (ans)

def __starting_point():
    solve()
__starting_point()

a = input()
b = input()
q = 0 # a > b
for i in b:
    if i == '1':
        q += 1
value = [0] * (len(a) + 1)
lenb = len(b)
ans = 0
for i in range(len(a)):
    value[i + 1] = value[i] + bool(a[i] == '1')
    if i + 1 >= lenb and (abs(value[i + 1] - value[i + 1 - lenb]) - q) % 2 == 0:
        ans += 1
print(ans)


a,b,res=input(),input(),0
sm1=sum(map(int,b[0:len(b)]))
sm2=sum(map(int,a[0:len(b)]))
res+=(sm1-sm2)%2==0
for i in range(len(b),len(a)):
	sm2+=a[i]=='1'
	sm2-=a[i-len(b)]=='1'
	res+=(sm1-sm2)%2==0
print(res)

a=input()
b=input()
bo=b.count("1")
lb=len(b)
ao=a[:lb].count("1")
final_ans=0
if (ao+bo)%2==0:
    final_ans+=1
for i in range(len(a)-lb):
    if a[i]=="1":
        ao-=1
    if a[i+lb]=="1":
        ao+=1
    if (ao+bo)%2==0:
        final_ans+=1
print(final_ans)

a, b = input(), input()
t = 0
l = [0,0]
for i in range(len(b)):t^=(int(a[i])^int(b[i]))
l[t]=1
for i in range(len(b),len(a)):
    t^=(int(a[i])^int(a[i-len(b)]))
    l[t]+=1

print(l[0])