#include <bits/stdc++.h>
const int inf = 1039074182;
using namespace std;
char c[1000005];
char b[1000005];
int n, k;
int sum[1000005];
int main() {
  scanf("%s", c);
  scanf("%s", b);
  n = strlen(c);
  k = strlen(b);
  int t = 0;
  for (int i = 0; i < k; i++) {
    t += (b[i] == '1');
  }
  sum[0] = (c[0] == '1');
  for (int i = 1; i < n; i++) {
    sum[i] = sum[i - 1] + (c[i] == '1');
  }
  int res = ((sum[k - 1] - t) % 2 == 0);
  for (int i = k; i < n; i++) {
    res += ((sum[i] - sum[i - k] - t) % 2 == 0);
  }
  cout << res << endl;
  return 0;
}
