#include <bits/stdc++.h>
using namespace std;
char a[1000010], b[1000010];
int main() {
  scanf("%s%s", a, b);
  int lena = strlen(a), lenb = strlen(b);
  int A = 0;
  for (int i = 1; i < lenb; ++i) A = (A + (b[i] != b[i - 1])) % 2;
  int B = 0;
  for (int i = 0; i < lenb; ++i) B = (B + (a[i] != b[i])) % 2;
  int ans = 1 - B;
  for (int i = 1; i + lenb - 1 < lena; ++i) {
    B = (B + A - (a[i - 1] != b[0]) + (a[lenb + i - 1] != b[lenb - 1]) + 2) % 2;
    ans += 1 - B;
  }
  printf("%d", ans);
  return 0;
}
