#include <bits/stdc++.h>
using namespace std;
int f(string a, string b, int i, int modb) {
  int num = 0;
  for (int j = 0; j < modb; j++) {
    if (a[i + j] != b[j]) num++;
  }
  return num;
}
int main() {
  int count = 0;
  string a, b;
  cin >> a >> b;
  int moda = a.size();
  int modb = b.size();
  int num = 0, k = 0;
  vector<int> v;
  for (int i = 0; i < moda - 1; i++)
    if (a[i] != a[i + 1]) v.push_back(i);
  for (int i = 0; i < modb; i++)
    if (a[i] != b[i]) num++;
  int vsize = v.size();
  int nsame = 0, ndiff = 0;
  for (int i = 0; i < vsize; i++) {
    if (v[i] > modb - 1) break;
    if (a[v[i]] == b[v[i]])
      nsame++;
    else
      ndiff++;
  }
  if (num % 2 == 0) count++;
  for (int i = 0; i < moda - modb; i++) {
    num = num + nsame - ndiff;
    int nindex = i + modb;
    int t = nsame;
    nsame = ndiff;
    ndiff = t;
    if (nindex != moda - 1 && a[nindex] != a[nindex + 1]) {
      if (a[nindex] == b[modb - 1])
        nsame++;
      else
        ndiff++;
    }
    if (k < vsize && i == v[k]) {
      if (a[i] == b[0])
        nsame--;
      else
        ndiff--;
      k++;
    }
    if (num % 2 == 0) count++;
  }
  cout << count;
  return 0;
}
