#include <bits/stdc++.h>
using namespace std;
int sum[1000000 + 9];
int main() {
  string s1, s2;
  cin >> s1 >> s2;
  int len1 = s1.size();
  int len2 = s2.size();
  for (int i = 1; i < len1; ++i) {
    sum[i] = sum[i - 1];
    if (s1[i] != s1[i - 1]) ++sum[i];
  }
  int all = 0;
  for (int i = 0; i < len2; ++i) {
    if (s1[i] != s2[i]) ++all;
  }
  all %= 2;
  int ans = 0;
  if (all % 2 == 0) ans = 1;
  for (int i = 1; i <= len1 - len2; ++i) {
    int tem = sum[len2 + i - 1] - sum[i - 1];
    tem %= 2;
    all ^= tem;
    ans += all ^ 1;
  }
  printf("%d", ans);
  return 0;
}
