#include <bits/stdc++.h>
using namespace std;
int sum[1000100];
int main() {
  string a, b;
  cin >> a >> b;
  int cnt = 0;
  for (int i = 0; i < b.size(); i++) {
    if (b[i] == '1') cnt++;
  }
  sum[0] = a[0] - '0';
  for (int i = 1; i < a.size(); i++) {
    sum[i] = sum[i - 1] + a[i] - '0';
  }
  int l = 0, r = b.size() - 1;
  int ans = 0;
  while (r < a.size()) {
    if (cnt % 2 == 0 && (sum[r] - sum[l] + a[l] - '0') % 2 == 0) {
      ans++;
    } else if (cnt % 2 != 0 && (sum[r] - sum[l] + a[l] - '0') % 2 != 0) {
      ans++;
    }
    l++;
    r++;
  }
  cout << ans << endl;
}
