#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e7 + 100;
char m[maxn], s[maxn];
int sum1[maxn];
int main() {
  scanf("%s", s + 1);
  scanf("%s", m + 1);
  int ss = strlen(s + 1);
  int mm = strlen(m + 1);
  int ans = 0, sum0 = 0;
  for (int i = 1; i <= ss; i++) {
    sum1[i] = sum1[i - 1] + s[i] - '0';
  }
  for (int i = 1; i <= mm; i++) {
    if (m[i] == '1') sum0++;
  }
  if (sum0 % 2 == 0) {
    for (int i = mm; i <= ss; i++)
      if ((sum1[i] - sum1[i - mm]) % 2 == 0) ans++;
  } else {
    for (int i = mm; i <= ss; i++)
      if ((sum1[i] - sum1[i - mm]) % 2 == 1) ans++;
  }
  printf("%d\n", ans);
  return 0;
}
