#include <bits/stdc++.h>
using namespace std;
long long arr[100000];
int main() {
  string a, b;
  cin >> a >> b;
  long long n = a.size(), m = b.size();
  long long bp = 0;
  long long ans = 0, cp = 0;
  for (long long i = 0; i < m; i++) {
    if (a[i] == '1') cp = (cp + 1) % 2;
    if (b[i] == '1') bp = (bp + 1) % 2;
  }
  long long l = 0, r = m - 1;
  for (long long i = 0; i <= n - m; i++) {
    if (i != 0) {
      if (a[l - 1] == '1') cp = 1 - cp;
      if (a[r] == '1') cp = 1 - cp;
    }
    if (cp == bp) ans++;
    l++;
    r++;
  }
  cout << ans << endl;
  return 0;
}
