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: MEDIUM_HARD

Solutions:
(n, m) = (input(), input())
ln = len(n)
lm = len(m)
ans = cnt = 0
for i in range(lm):
	if n[i] == '1':
		cnt += 1
	if m[i] == '1':
		cnt += 1
if cnt % 2 == 0:
	ans = 1
for i in range(lm, ln):
	if n[i] == '1':
		cnt += 1
	if n[i - lm] == '1':
		cnt -= 1
	if cnt % 2 == 0:
		ans += 1
print(ans)


from collections import deque
a = input()
b = input()
a1 = len(a)
b1 = len(b)
k = 0
d = deque([])
for i in range(b1):
	if a[i] != b[i]:
		k += 1
l = 0
if k % 2 == 0:
	l += 1
if a1 == b1:
	print(l)
else:
	for i in range(b1):
		if a[i] == a[i + 1]:
			d.append(0)
		else:
			d.append(1)
	m = sum(d)
	k += m
	if k % 2 == 0:
		l += 1
	for i in range(1, a1 - b1):
		m -= d[0]
		d.popleft()
		if a[i + b1] == a[i + b1 - 1]:
			d.append(0)
		else:
			d.append(1)
		m += d[-1]
		k += m
		if k % 2 == 0:
			l += 1
	print(l)


a = input()
b = input()
Ans = 0
X = 0
Y = 0
for i in range(len(b)):
	if a[i] == '1':
		X += 1
	if b[i] == '1':
		Y += 1
if X % 2 == Y % 2:
	Ans += 1
for i in range(len(b), len(a)):
	if a[i] == '1':
		X += 1
	if a[i - len(b)] == '1':
		X += 1
	if X % 2 == Y % 2:
		Ans += 1
print(Ans)


A = input()
B = input()
cnt1b = 0
for i in B:
	if i == '1':
		cnt1b += 1
a = []
for i in range(len(A)):
	if i == 0:
		if A[i] == '1':
			a.append(1)
		else:
			a.append(0)
	else:
		a.append(a[i - 1] + (1 if A[i] == '1' else 0))
ans = 0
for i in range(len(a)):
	if i + len(B) - 1 >= len(a):
		break
	cnt = 0
	if i > 0:
		cnt -= a[i - 1]
	cnt += a[i + len(B) - 1]
	ans += cnt % 2 == cnt1b % 2
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(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)
if len(sys.argv) > 1 and sys.argv[1] == 'True':
	IS_LOCAL = True
main()


a = input()
b = input()
(k, ans) = (1, 0)
for i in range(len(b)):
	k ^= a[i] != b[i]
ans = k
for i in range(len(b), len(a)):
	k ^= a[i] != a[i - len(b)]
	ans += k
print(ans)


a = input()
b = input()
lea = len(a)
leb = len(b)
c1 = 0
c2 = 0
for i in range(leb):
	if a[i] == '1':
		c1 += 1
	if b[i] == '1':
		c2 += 1
ans = 0
if c1 % 2 == c2 % 2:
	ans += 1
for j in range(leb, lea):
	if a[j] == '1':
		c1 += 1
	if a[j - leb] == '1':
		c1 -= 1
	if c1 % 2 == c2 % 2:
		ans += 1
print(ans)


import sys
sys.setrecursionlimit(10 ** 5 + 1)
inf = int(10 ** 20)
max_val = inf
min_val = -inf
RW = lambda : sys.stdin.readline().strip()
RI = lambda : int(RW())
RMI = lambda : [int(x) for x in sys.stdin.readline().strip().split()]
RWI = lambda : [x for x in sys.stdin.readline().strip().split()]
(src, tgt) = ([int(x) for x in input()], [int(x) for x in input()])
(lens, lent) = (len(src), len(tgt))
answ = 0
nmc = sum([1 for (x, y) in zip(src[:lent], tgt) if x != y])
answ += nmc % 2 == 0
for i in range(lent, lens):
	nmc += src[i] != src[i - lent]
	answ += nmc % 2 == 0
print(answ)


def value_dif(a_string, b_string, size_a, size_b):
	count = [0, 0]
	check = 0
	for i in range(size_b):
		check ^= int(a_string[i]) ^ int(b_string[i])
	count[check] = 1
	for i in range(0, size_a - size_b):
		check ^= int(a_string[i]) ^ int(a_string[i + size_b])
		count[check] += 1
	return count[0]

def main():
	a = input()
	b = input()
	a_len = len(a)
	b_len = len(b)
	even = value_dif(a, b, a_len, b_len)
	print(even)
main()


def is_good(a, b):
	if (int(a, 2) & b) % 2 == 0:
		return 1
	return 0

def go():
	a = input()
	b = input()
	c_b = sum((1 for i in b if i == '1'))
	c_a = sum((1 for i in range(len(b)) if a[i] == '1'))
	c = 0
	if c_b % 2 == c_a % 2:
		c += 1
	for i in range(len(b), len(a)):
		c_b -= int(a[i - len(b)])
		c_b += int(a[i])
		if c_b % 2 == c_a % 2:
			c += 1
	return c
print(go())


a = input()
b = input()
(cnt1, cnt2) = (0, 0)
for i in range(len(b)):
	cnt1 += a[i] == '1'
for i in b:
	cnt2 += i == '1'
ans = cnt1 % 2 == cnt2 % 2
for i in range(len(b), len(a)):
	cnt1 += a[i] == '1'
	cnt1 -= a[i - len(b)] == '1'
	ans += cnt1 % 2 == cnt2 % 2
print(ans + 0)


import collections as cc
import math as mt
import sys
I = lambda : list(map(int, input().split()))
a = input()
b = input()
no = 0
for i in range(len(b)):
	if a[i] != b[i]:
		no += 1
ans = 0
if no % 2 == 0:
	ans += 1
for i in range(len(b), len(a)):
	if a[i] != a[i - len(b)]:
		no += 1
	if no % 2 == 0:
		ans += 1
print(ans)


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


A = input()
B = input()
a = len(A)
b = len(B)
X = A[:b]
t = 0
c = 0
for i in range(b):
	if B[i] != X[i]:
		t += 1
if t % 2 == 0:
	c += 1
for i in range(b, a):
	if A[i] == A[i - b]:
		if t % 2 == 0:
			c += 1
	else:
		t += 1
		if t % 2 == 0:
			c += 1
print(c)


def changelling(s, t):
	(count1, count2, count) = (0, 0, 0)
	(n, m) = (len(s), len(t))
	for i in range(m):
		if t[i] == '1':
			count2 = (count2 + 1) % 2
	for i in range(m):
		if s[i] == '1':
			count1 = (count1 + 1) % 2
	for i in range(m - 1, n):
		if count1 == count2:
			count += 1
		if i == n - 1:
			continue
		if s[i - m + 1] == '1':
			count1 = (count1 + 1) % 2
		if s[i + 1] == '1':
			count1 = (count1 + 1) % 2
	return count
x = input()
y = input()
print(changelling(x, y))


import sys
from collections import deque
a = input().rstrip()
b = input().rstrip()
la = len(a)
lb = len(b)
pre = [0] * (la + 1)
for i in range(la):
	if a[i] == '1':
		pre[i + 1] += 1
for i in range(1, la + 1):
	pre[i] += pre[i - 1]
cntB = 0
for i in range(lb):
	if b[i] == '1':
		cntB += 1
cntB %= 2
ans = 0
for i in range(la - lb + 1):
	if (pre[i + lb] - pre[i]) % 2 == cntB:
		ans += 1
print(ans)


def sum_digits(num):
	num = str(num)
	sum = 0
	for i in num:
		sum += int(i)
	return sum

def fun(a, b):
	if a % 2 == b:
		return 1
	else:
		return 0
a = input()
b = input()
b_sum = sum_digits(b) % 2
initial_sum = sum_digits(a[:len(b)])
count = 0
for i in range(len(a) - len(b) + 1):
	count += fun(initial_sum, b_sum)
	if i != len(a) - len(b):
		initial_sum = initial_sum - int(a[i]) + int(a[i + len(b)])
print(count)


arr1 = list(map(int, input()))
arr2 = list(map(int, input()))
bone = arr2.count(1) % 2
b = len(arr2)
l = list()
org = 0
for i in range(len(arr1)):
	if arr1[i] == 1:
		org = org + 1
	if i >= b and arr1[i - b] == 1:
		org = org - 1
	l.append(org % 2)
score = 0
for i in range(b - 1, len(arr1)):
	if l[i] == bone:
		score += 1
print(score)


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)


a = input()
b = input()
n = len(a)
m = len(b)
ans = 0
cb = 0
for x in b:
	if x == '1':
		cb = cb + 1
sm = []
sm.append(0)
for i in range(n):
	if a[i] == '1':
		sm.append(sm[i] + 1)
	else:
		sm.append(sm[i])
for i in range(m, n + 1):
	how = sm[i] - sm[i - m]
	if how % 2 == cb % 2:
		ans = ans + 1
print(ans)


a = input()
b = input()
alen = len(a)
blen = len(b)
diff = list()
ans = 0
temp = 0
for i in range(blen):
	if a[i] != b[i]:
		temp += 1
diff.append(temp % 2)
for i in range(blen, alen):
	if a[i] == a[i - blen]:
		diff.append(diff[i - blen])
	else:
		diff.append((diff[i - blen] + 1) % 2)
for d in diff:
	if d % 2 == 0:
		ans += 1
print(ans)


(s1, s2) = [input(), input()]
(l1, l2) = [len(s1), len(s2)]
(cnt1, cnt2, l, p, ans) = [0, 0, 0, 0, 0]
for i in s2:
	if i == '1':
		cnt2 += 1
	l += 1
for i in range(0, l1):
	if s1[i] == '1':
		cnt1 += 1
	p += 1
	if p > l2:
		if s1[i - l2] == '1':
			cnt1 -= 1
	if p >= l2:
		if abs(cnt1 - cnt2) % 2 == 0:
			ans += 1
print(ans)


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)


a = input()
b = input()
tot = 0
ans = 0
for i in b:
	if i is '1':
		tot += 1
pre = [0] * 1000005
for i in range(len(a)):
	if a[i] == '1':
		pre[i] += 1
	if i is not 0:
		pre[i] += pre[i - 1]
for i in range(len(b) - 1, len(a)):
	if tot % 2 == (pre[i] - pre[i - len(b)]) % 2:
		ans += 1
print(ans)


a = input()
b = input()
(l_a, l_b) = (len(a), len(b))
sub = []
ans = 0
b_c = b.count('1')
count_a = [0] * (l_a + 1)
for i in range(l_a):
	count_a[i + 1] = count_a[i] + (a[i] == '1')
for i in range(l_a - l_b + 1):
	ans += (count_a[i + l_b] - count_a[i] + b_c) % 2 == 0
print(ans)


a = input()
b = input()
i = 0
j = len(b)
dp = []
co = b.count('1')
po1 = [[0, 0]]
for j in range(1, len(a) + 1):
	if a[j - 1] == '1':
		po1.append([po1[-1][0] + 1, po1[-1][1]])
	else:
		po1.append([po1[-1][0], po1[-1][1] + 1])
po1.pop(0)
i = 0
j = i + len(b) - 1
ans = 0
while j < len(a):
	if i == 0:
		coun1 = po1[j][0]
		i += 1
		j += 1
		if co % 2 == coun1 % 2:
			ans += 1
	else:
		coun1 = po1[j][0] - po1[i - 1][0]
		i += 1
		j += 1
		if co % 2 == coun1 % 2:
			ans += 1
print(ans)


a = input()
b = input()
cnt = 0
cntb = 0
for i in range(len(b)):
	if i + 1 < len(b):
		if b[i] != b[i + 1]:
			cntb += 1
	if a[i] != b[i]:
		cnt += 1
ans = 0
for i in range(len(a) - len(b) + 1):
	if cnt % 2 == 0:
		ans += 1
	if i + len(b) < len(a):
		cnt += cntb
		if a[i] != b[0]:
			cnt += 1
		if a[i + len(b)] != b[-1]:
			cnt += 1
print(ans)


s1 = input()
s2 = input()
l1 = len(s1)
l2 = len(s2)
output = 0
cntb = 0
cntc = 0
for i in range(l2):
	if s1[i] == '1':
		cntb += 1
	if s2[i] == '1':
		cntc += 1
if cntb % 2 == cntc % 2:
	output += 1
for j in range(l2, l1):
	if s1[j] == '1':
		cntb += 1
	if s1[j - l2] == '1':
		cntb -= 1
	if cntb % 2 == cntc % 2:
		output += 1
print(output)


str1 = input()
str2 = input()
dl1 = len(str1)
dl2 = len(str2)
cntone = 0
cnttwo = 0
cycle = 0
rez = 0
for i in str2:
	if i == '1':
		cnttwo += 1
for i in str1:
	if i == '1':
		cntone += 1
	cycle += 1
	if cycle >= dl2:
		break
if (cnttwo + cntone) % 2 == 0:
	rez += 1
cycle = 0
if dl1 > dl2:
	for i in range(dl2, dl1):
		if str1[i - dl2] == '1':
			cntone -= 1
		if str1[i] == '1':
			cntone += 1
		cycle += 1
		if (cnttwo + cntone) % 2 == 0:
			rez += 1
print(rez)


import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
stra = [int(k) for k in input()]
strb = [int(k) for k in input()]
n = len(stra)
m = len(strb)
par = sum(strb) % 2
count = 0
for s in range(m):
	count += stra[s]
count = count % 2
ans = 0
if (par + count) % 2 == 0:
	ans += 1
for s in range(m, n):
	count -= stra[s - m]
	count += stra[s]
	if (par + count) % 2 == 0:
		ans += 1
print(ans)


a = input()
b = input()
ans = 0
(cnt0, cnt1) = (0, 0)
(tar0, tar1) = (0, 0)
la = len(a)
lb = len(b)
for i in b:
	if i == '0':
		tar0 += 1
	else:
		tar1 += 1
for i in range(lb):
	if a[i] == '0':
		cnt0 += 1
	else:
		cnt1 += 1
if abs(cnt1 - tar1) % 2 == 0:
	ans += 1
for i in range(lb, la):
	if a[i] == '0':
		cnt0 += 1
	else:
		cnt1 += 1
	if a[i - lb] == '0':
		cnt0 -= 1
	else:
		cnt1 -= 1
	if abs(cnt1 - tar1) % 2 == 0:
		ans += 1
print(ans)


a = input()
b = input()
(a1, b1) = (0, 0)
res = 0
for i in b:
	if i == '1':
		b1 += 1
ai = a[:len(b)]
for i in ai:
	if i == '1':
		a1 += 1
if (a1 - b1) % 2 == 0:
	res += 1
for i in range(len(a) - len(b)):
	if a[i] == '1':
		a1 += 1
	if a[i + len(b)] == '1':
		a1 += 1
	if (a1 - b1) % 2 == 0:
		res += 1
print(res)


from decimal import *
import sys, os, io
from sys import stdin
from math import log, gcd, ceil
from collections import defaultdict, deque, Counter
from heapq import heappush, heappop
from bisect import bisect_left, bisect_right
import math
sys.setrecursionlimit(100000)
alphabets = list('abcdefghijklmnopqrstuvwxyz')

def isPrime(x):
	for i in range(2, x):
		if i * i > x:
			break
		if x % i == 0:
			return False
	return True

def ncr(n, r, p):
	num = den = 1
	for i in range(r):
		num = num * (n - i) % p
		den = den * (i + 1) % p
	return num * pow(den, p - 2, p) % p

def primeFactors(n):
	l = []
	while n % 2 == 0:
		l.append(2)
		n = n / 2
	for i in range(3, int(math.sqrt(n)) + 1, 2):
		while n % i == 0:
			l.append(int(i))
			n = n / i
	if n > 2:
		l.append(n)
	c = dict(Counter(l))
	return list(set(l))

def power(x, y, p):
	res = 1
	x = x % p
	if x == 0:
		return 0
	while y > 0:
		if y & 1 == 1:
			res = res * x % p
		y = y >> 1
		x = x * x % p
	return res

def sieveForSmallestPrimeFactor():
	MAXN = 100001
	spf = [0 for i in range(MAXN)]
	spf[1] = 1
	for i in range(2, MAXN):
		spf[i] = i
	for i in range(4, MAXN, 2):
		spf[i] = 2
	for i in range(3, math.ceil(math.sqrt(MAXN))):
		if spf[i] == i:
			for j in range(i * i, MAXN, i):
				if spf[j] == j:
					spf[j] = i
	return spf

def getPrimeFactorizationLOGN(x):
	spf = sieveForSmallestPrimeFactor()
	ret = list()
	while x != 1:
		ret.append(spf[x])
		x = x // spf[x]
	return ret

def SieveOfEratosthenes(n):
	prime = [True for i in range(n + 1)]
	p = 2
	pr = []
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	for i in range(2, len(prime)):
		if prime[i]:
			pr.append(i)
	return pr

def si():
	return input()

def divideCeil(n, x):
	if n % x == 0:
		return n // x
	return n // x + 1

def ii():
	return int(input())

def li():
	return list(map(int, input().split()))
if os.path.exists('input.txt'):
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')

def solve():
	a = list(si())
	b = list(si())
	cntb = b.count('1')
	ans = 0
	i = 0
	s = a[:len(b)].count('1')
	for i in range(len(a)):
		if s % 2 == cntb % 2:
			ans += 1
		if i + len(b) >= len(a):
			break
		if a[i + len(b)] == '1':
			s += 1
		if a[i] == '1':
			s -= 1
	print(ans)
t = 1
for _ in range(t):
	solve()


import os
import sys
import math
from io import BytesIO, IOBase
from fractions import Fraction
import collections
from itertools import permutations
from collections import defaultdict
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
a = input()
b = input()
b1 = b.count('1')
pre = [0]
for i in a:
	pre.append(pre[-1])
	if i == '1':
		pre[-1] += 1
c = 0
for i in range(len(b), len(a) + 1):
	d = pre[i] - pre[i - len(b)]
	if d % 2 == b1 % 2:
		c += 1
print(c)


a = input()
b = input()
c = 0
d = 0
for i in range(len(b)):
	if b[i] == '1':
		c = c + 1
ans = 0
for i in range(len(b) - 1):
	if a[i] == '1':
		d = d + 1
for i in range(len(a) - len(b) + 1):
	if a[i + len(b) - 1] == '1':
		d = d + 1
	if d % 2 == c % 2:
		ans = ans + 1
	if a[i] == '1':
		d = d - 1
print(ans)


a = input()
b = input()
la = len(a)
lb = len(b)
count = 0
s = [0] * (la + 1)
sb = b.count('1')
for i in range(0, la):
	s[i + 1] = s[i] + (a[i] == '1')
for i in range(la - lb + 1):
	count += (s[i + lb] - s[i] - sb) % 2 == 0
print(count)


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(res)


a = list(map(int, list(input())))
b = list(map(int, list(input())))
n = len(b)
acc_b = sum(b) % 2
acc_a = sum(a[:n]) % 2
cnt = 0 if acc_a ^ acc_b else 1
for i in range(n, len(a)):
	acc_a = acc_a ^ a[i] ^ a[i - n]
	cnt += 0 if acc_a ^ acc_b else 1
print(cnt)


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)


import sys

def input():
	return sys.stdin.readline().rstrip()

def slv():
	a = list(map(int, list(input())))
	b = list(map(int, list(input())))
	n = len(a)
	m = len(b)
	sign = 0
	for i in range(m - 1):
		if b[i] != b[i + 1]:
			sign ^= 1
	ans = 0
	dif = 0
	for i in range(m):
		if a[i] != b[i]:
			dif ^= 1
	if dif == 0:
		ans += 1
	for i in range(n - m):
		if sign:
			dif ^= 1
		if a[m + i] != b[-1]:
			dif ^= 1
		if a[i] != b[0]:
			dif ^= 1
		if dif == 0:
			ans += 1
	print(ans)
	return

def main():
	t = 1
	for i in range(t):
		slv()
	return
main()


from collections import Counter
import string
import bisect
import random
import math
import sys
from fractions import Fraction

def array_int():
	return [int(i) for i in sys.stdin.readline().split()]

def vary(arrber_of_variables):
	if arrber_of_variables == 1:
		return int(sys.stdin.readline())
	if arrber_of_variables >= 2:
		return map(int, sys.stdin.readline().split())

def makedict(var):
	return dict(Counter(var))
testcases = 1
for _ in range(testcases):
	s = [int(i) for i in input()]
	s2 = input()
	ones = s2.count('1')
	ans = 0
	ans += 1 if sum(s[0:len(s2)]) % 2 == ones % 2 else 0
	k = 0
	value = sum(s[0:len(s2)])
	for i in range(len(s) - len(s2)):
		value += s[i + len(s2)] - s[i]
		ans += 1 if value % 2 == ones % 2 else 0
	print(ans)


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
s1 = input()
s2 = input()
(n1, n2) = (0, 0)
for i in range(len(s2)):
	n1 += 1 if s1[i] == '1' else 0
	n2 += 1 if s2[i] == '1' else 0
res = 1 if n1 & 1 == n2 & 1 else 0
for i in range(len(s2), len(s1)):
	if s1[i] == '1':
		n1 += 1
	if s1[i - len(s2)] == '1':
		n1 -= 1
	res += 1 if n1 & 1 == n2 & 1 else 0
print(res)


a = input()
b = input()
q = 0
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)


s = input()
t = input()
(l, r) = (0, len(t))
sums = 0
tsum = 0
for i in range(len(t)):
	if t[i] == '1':
		tsum += 1
while l < r:
	if s[l] == '1':
		sums += 1
	l += 1
l = 0
ans = 0
while True:
	if sums % 2 == tsum % 2:
		ans += 1
	if r == len(s):
		break
	if s[l] == '1':
		sums -= 1
	if s[r] == '1':
		sums += 1
	l += 1
	r += 1
print(ans)


s = input()
t = input()
sum = 0
for c in t:
	if c == '1':
		sum += 1
sum2 = 0
ans = 0
for i in range(0, len(s)):
	if s[i] == '1':
		sum2 += 1
	if i >= len(t) and s[i - len(t)] == '1':
		sum2 -= 1
	if i >= len(t) - 1 and sum % 2 == sum2 % 2:
		ans += 1
print(ans)


import sys
a = list(map(int, input()))
b = list(map(int, input()))
for i in range(1, len(a)):
	a[i] += a[i - 1]
b_sum = sum(b)
ans = 0
ans += a[len(b) - 1] % 2 == b_sum % 2
for i in range(len(b), len(a)):
	ans += (a[i] - a[i - len(b)]) % 2 == b_sum % 2
print(ans)


(b, c) = (input(), input())
lb = len(b)
lc = len(c)
ans = cnt = 0
for i in range(lc):
	if b[i] == '1':
		cnt += 1
	if c[i] == '1':
		cnt += 1
if cnt % 2 == 0:
	ans = 1
for i in range(lc, lb):
	if b[i] == '1':
		cnt += 1
	if b[i - lc] == '1':
		cnt -= 1
	if cnt % 2 == 0:
		ans += 1
print(ans)


a = input()
b = input()
al = len(a)
bl = len(b)
import sys
if bl == 1:
	cnt = 0
	for i in range(al):
		if a[i] == b:
			cnt += 1
	print(cnt)
	sys.exit()
if al == bl:
	diff = 0
	for i in range(bl):
		if a[i] != b[i]:
			diff += 1
	if diff % 2 == 0:
		print(1)
	else:
		print(0)
	sys.exit()
even = True
cnt = 0
difn = 0
for i in range(bl):
	if a[i] != a[i + 1]:
		difn += 1
mv = True
for i in range(al - bl - 1):
	if difn % 2 == 1:
		mv = not mv
	if sum([int(a[q]) for q in [i, i + 1, i + bl + 1, i + bl]]) % 2 == 1:
		difn += 1
	if mv:
		cnt += 1
if difn % 2 == 1:
	mv = not mv
if mv:
	cnt += 1
diff = 0
for i in range(bl):
	if a[i] != b[i]:
		diff += 1
if diff % 2 == 0:
	print(cnt + 1)
else:
	print(al - bl - cnt)


s = input()
t = input()
n = 0
ans = 0
for i in t:
	if i == '1':
		n += 1
m = 0
for i in range(len(t)):
	if s[i] == '1':
		m += 1
for i in range(len(t), len(s)):
	if (m + n) % 2 == 0:
		ans += 1
	if s[i] != s[i - len(t)]:
		m += 1
if (m + n) % 2 == 0:
	ans += 1
print(ans)


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])


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)


def check(b):
	c = 0
	for i in range(len(b)):
		if b[i] == '1':
			c += 1
	return c
a = input()
b = input()
c1 = check(b)
c = [0] * (len(a) + 1)
c[1] = int(a[0])
c[0] = 0
ans = 0
for i in range(2, len(a) + 1):
	c[i] = c[i - 1] + int(a[i - 1])
for i in range(len(b), len(a) + 1):
	t = c[i] - c[i - len(b)]
	if abs(t - c1) % 2 == 0:
		ans += 1
print(ans)


s = input()
b = input()
n = len(b)
(c, t) = (0, 0)
for i in range(n):
	if b[i] == '0':
		c += 1
	if s[i] == '0':
		t += 1
f = 0
if (t - c) % 2 == 0:
	f += 1
for i in range(n, len(s)):
	if s[i - n] == '0':
		t -= 1
	if s[i] == '0':
		t += 1
	if (t - c) % 2 == 0:
		f += 1
print(f)


a = list(map(int, list(input())))
b = list(map(int, list(input())))
val = sum(b) % 2
ind = 0
start = sum(a[:len(b)])
out = (val + start + 1) % 2
while ind < len(a) - len(b):
	start += a[ind + len(b)] - a[ind]
	out += (val + start + 1) % 2
	ind += 1
print(out)


a = [0] + [int(i) for i in input()]
b = [int(i) for i in input()]
(l1, l2) = (len(a), len(b))
b1 = sum(b) % 2
for i in range(1, l1):
	a[i] += a[i - 1]
res = 0
for i in range(l2, l1):
	c = a[i] - a[i - l2]
	res += c % 2 ^ b1 == 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)


s1 = input()
s2 = input()
ans = 0
tot = 0
for i in range(len(s2)):
	tot += s1[i] != s2[i]
ans += tot % 2 == 0
for i in range(len(s2), len(s1)):
	tot += s1[i] != s1[i - len(s2)]
	ans += tot % 2 == 0
print(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])


a = input()
b = input()
(b1, b0) = (0, 0)
(a1, a0) = (0, 0)
ans = 0
preNum = a[0]
for i in range(len(b)):
	if b[i] == '1':
		b1 += 1
	else:
		b0 += 1
	if a[i] == '1':
		a1 += 1
	else:
		a0 += 1
if (a1 - b1) % 2 == 0:
	ans += 1
for i in range(len(b), len(a)):
	if a[i] == '1':
		a1 += 1
	else:
		a0 += 1
	if preNum == '1':
		a1 -= 1
	else:
		a0 -= 1
	preNum = a[i - len(b) + 1]
	if (a1 - b1) % 2 == 0:
		ans += 1
print(ans)


import sys
input = sys.stdin.readline
(a, b, res, ca, cb) = (input()[:-1], input()[:-1], 0, 0, 0)
(lb, la) = (len(b), len(a))
for i in range(lb):
	if a[i] == '1':
		ca += 1
	if b[i] == '1':
		cb += 1
if ca % 2 == cb % 2:
	res += 1
for i in range(lb, la):
	if a[i] == '1':
		ca += 1
	if a[i - lb] == '1':
		ca += 1
	if ca % 2 == cb % 2:
		res += 1
print(res)


def main():
	a = input()
	b = input()
	suma = [0 for i in range(len(a) + 1)]
	for i in range(1, 1 + len(a)):
		suma[i] = suma[i - 1] + (a[i - 1] == '1')
	sumb = 0
	for i in range(len(b)):
		sumb += b[i] == '1'
	ans = 0
	for i in range(len(b), len(a) + 1):
		if (suma[i] - suma[i - len(b)]) % 2 == sumb % 2:
			ans += 1
	print(ans)
main()


import math

def main():
	a = input()
	b = input()
	c = a[:len(b)]
	cnt = 0
	cntd = 0
	ans = 0
	for i in c:
		if i == '1':
			cnt += 1
	for i in b:
		if i == '1':
			cntd += 1
	if cnt % 2 == cntd % 2:
		ans += 1
	for i in range(len(b), len(a)):
		if a[i] == '1':
			cnt += 1
		if a[i - len(b)] == '1':
			cnt -= 1
		if cnt % 2 == cntd % 2:
			ans += 1
	print(ans)
main()


a = [int(x) for x in input()]
b = [int(x) for x in input()]
n = len(a) + 1
m = len(b)
s = [0 for _ in range(n)]
for i in range(1, n):
	s[i] = s[i - 1] + a[i - 1]
k = sum(b) % 2
ans = 0
for i in range(m, n):
	if (s[i] - s[i - m]) % 2 == k:
		ans += 1
print(ans)


a = input()
b = input()
c = 0
qw = (len(b) - a[:len(b)].count('0') + b.count('1')) % 2
if qw % 2 == 0:
	c = c + 1
for i in range(len(b), len(a)):
	if a[i] == '0':
		qw = qw + 1
	if a[i - len(b)] == '0':
		qw = qw - 1
	if qw % 2 == 0:
		c = c + 1
print(c)


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 = [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
	elif flag:
		flag = False
	else:
		answer += 1
		flag = True
	if a[i - n] != a[i - n + 1]:
		odd += 1
		odd %= 2
print(answer)


(a, b) = (input(), input())
ans = t = 0
for i in range(len(b)):
	t += a[i] != b[i]
ans += t % 2 == 0
for i in range(len(b), len(a)):
	t += a[i] != a[i - len(b)]
	ans += t % 2 == 0
print(ans)


a = input()
b = input()
c1 = b.count('1')
c2 = a[:len(b)].count('1')
ans = 0
if (c1 - c2) % 2 == 0:
	ans += 1
x = len(b)
for i in range(x, len(a)):
	if a[i] == '1':
		c2 += 1
	if a[i - x] == '1':
		c2 -= 1
	if (c1 + c2) % 2 == 0:
		ans += 1
print(ans)


import sys, math, queue, bisect
MOD = 10 ** 9 + 7
sys.setrecursionlimit(1000000)
a = list(map(int, list(input())))
b = list(map(int, list(input())))
n = len(a)
m = len(b)
a.append(0)
b = sum(b)
for i in range(1, n):
	a[i] += a[i - 1]
ans = 0
for i in range(n - m + 1):
	if (a[i + m - 1] - a[i - 1] + b) % 2 == 0:
		ans += 1
print(ans)


a = input()
b = input()
len_a = len(a)
len_b = len(b)
cntb = 0
for i in range(len_b):
	cntb += int(b[i])
cnta = 0
for i in range(len_b):
	cnta += int(a[i])
answer = int(cnta % 2 == cntb % 2)
for i in range(len_b, len_a):
	cnta += int(a[i]) - int(a[i - len_b])
	answer += int(cnta % 2 == cntb % 2)
print(answer)


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)


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()
na = len(a)
nb = len(b)
cntc = cntb = 0
for i in range(nb):
	if b[i] == '1':
		cntb += 1
	if a[i] == '1':
		cntc += 1
ans = 0
if cntb % 2 == cntc % 2:
	ans += 1
for i in range(1, na):
	if i + nb > na:
		break
	else:
		if a[i - 1] == '1':
			cntc -= 1
		if a[i + nb - 1] == '1':
			cntc += 1
		if cntb % 2 == cntc % 2:
			ans += 1
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()
len_a = len(a)
len_b = len(b)
n = len_a - len_b + 1
sum_a = 0
sum_b = 0
cnt = 0
for i in range(len_b):
	sum_a += int(a[i])
	sum_b += int(b[i])
for i in range(n - 1):
	if (sum_a + sum_b) % 2 == 0:
		cnt += 1
	sum_a -= int(a[i])
	sum_a += int(a[len_b + i])
if (sum_a + sum_b) % 2 == 0:
	cnt += 1
print(cnt)