#include <bits/stdc++.h>
using namespace std;
char s[2000000], t[2000000];
int a[2000000];
int main() {
  cin >> s >> t;
  int tot = 0;
  a[0] = 0;
  int lt = strlen(t), ls = strlen(s);
  for (int i = 0; i < ls; ++i) {
    a[i + 1] = a[i];
    if (s[i] == '1') a[i + 1]++;
  }
  for (int i = 0; i < lt; ++i) {
    if (t[i] == '1') ++tot;
  }
  int ans = 0;
  for (int i = lt; i <= ls; ++i) {
    if ((a[i] - a[i - lt]) % 2 == (tot % 2)) ++ans;
  }
  printf("%d", ans);
  return 0;
}
