#include <bits/stdc++.h>
using namespace std;
const int p = 998244353;
char s1[1010100], s2[1010000], k = 0;
int l1, l2, an, ans;
int main() {
  scanf("%s", s1);
  scanf("%s", s2);
  l1 = strlen(s1);
  l2 = strlen(s2);
  for (int i = 0; i <= l2 - 1; i++)
    if (s1[i] != s2[i]) an++;
  for (int i = 1; i <= l2 - 1; i++)
    if (s1[i] != s1[i - 1]) k++;
  if (an % 2 == 0) ans++;
  for (int i = 0; i <= 1010000; i++) {
    if (i + l2 >= l1) break;
    if (s1[i + l2] != s2[l2 - 1]) an++;
    an = an + k % 2;
    if (s1[i + l2 - 1] != s2[l2 - 1]) an--;
    if (an % 2 == 0) ans++;
    if (s1[i] != s1[i + 1]) k--;
    if (s1[i + l2] != s1[i + l2 - 1]) k++;
  }
  printf("%d\n", ans);
}
