#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9;
const int MODV = 1e9 + 7;
int alen, blen;
char a[1000001];
char b[1000001];
int change;
int main() {
  int ans = 0;
  int ev;
  scanf("%s %s", a, b);
  alen = strlen(a);
  blen = strlen(b);
  change = 0;
  for (int i = 0; i < blen - 1; i++)
    if (b[i] != b[i + 1]) change ^= 1;
  ev = 1;
  for (int i = 0; i < blen; i++)
    if (a[i] != b[i]) ev ^= 1;
  ans += ev;
  for (int i = blen; i < alen; i++) {
    if (b[0] != a[i - blen]) ev ^= 1;
    if (change) ev ^= 1;
    if (b[blen - 1] != a[i]) ev ^= 1;
    ans += ev;
  }
  printf("%d\n", ans);
  return 0;
}
