#include <bits/stdc++.h>
const int maxn = 1e6 + 10;
using namespace std;
int pre[maxn];
int main() {
  string a, b;
  cin >> a;
  cin >> b;
  int LA = a.size();
  int LB = b.size();
  int flag = 0, ans = 0;
  for (int i = 0; i < LB; i++) {
    if (b[i] == '1') flag++;
  }
  flag %= 2;
  if (a[0] == '1') pre[1] = 1;
  for (int i = 1; i < LA; i++) {
    if (a[i] == '1')
      pre[i + 1] = pre[i] + 1;
    else
      pre[i + 1] = pre[i];
  }
  int T = LA - LB;
  for (int i = 0; i <= T; i++) {
    if ((pre[i + LB] - pre[i]) % 2 == flag) {
      ans++;
    }
  }
  cout << ans << endl;
  return 0;
}
