#include <bits/stdc++.h>
using namespace std;
inline char gc() {
  static char now[1 << 16], *S, *T;
  if (S == T) {
    T = (S = now) + fread(now, 1, 1 << 16, stdin);
    if (S == T) return EOF;
  }
  return *S++;
}
inline int read() {
  int x = 0, f = 1;
  char c = getchar();
  while (c < '0' || c > '9') {
    (c == '-') ? (f = 0) : 0;
    c = getchar();
  }
  while (c >= '0' && c <= '9') {
    x = (x << 3) + (x << 1) + (c ^ 48);
    c = getchar();
  }
  return f ? x : ((~x) + 1);
}
const int N = 1000010;
int n, m;
char a[N], b[N];
int sum[N];
int main() {
  scanf("%s", a + 1);
  scanf("%s", b + 1);
  n = strlen(a + 1);
  m = strlen(b + 1);
  int res = 0;
  for (int(i) = (1); (i) <= (m); ++(i)) res ^= (b[i] - '0');
  for (int(i) = (1); (i) <= (n); ++(i)) {
    sum[i] = sum[i - 1] ^ (a[i] - '0');
  }
  int ans = 0;
  for (int i = 1; i + m - 1 <= n; ++i) {
    if (sum[i + m - 1] ^ sum[i - 1] ^ res)
      ;
    else
      ++ans;
  }
  printf("%d\n", ans);
  return 0;
}
