#include <bits/stdc++.h>
using namespace std;
int a[1000 * 1000 + 100], b[1000 * 1000 + 100];
int main() {
  string a, b;
  cin >> a >> b;
  int na = a.size(), nb = b.size();
  int zb = 0;
  int Z = 0;
  int ted = 0;
  for (int i = 0; i < nb - 1; i++) {
    if (b[i] != b[i + 1]) zb = 1 - zb;
    if (b[i] != a[i]) Z = 1 - Z;
  }
  if (b[nb - 1] != a[nb - 1]) Z = 1 - Z;
  if (Z == 0) ted++;
  for (int j = 1; j <= na - nb; j++) {
    Z = Z + zb + (a[j - 1] != b[0]) + (a[j + nb - 1] != b[nb - 1]);
    Z %= 2;
    if (Z == 0) ted++;
  }
  cout << ted << endl;
  return 0;
}
