#include <bits/stdc++.h>
using namespace std;
int main() {
  string a, b;
  cin >> a >> b;
  long long int la = a.length(), lb = b.length();
  vector<long long int> cnta(la, 0);
  long long int cntb = 0;
  for (long long int i = 0; i < lb; i++) {
    if (b[i] == '1') cntb++;
  }
  for (long long int i = 0; i < lb; i++) {
    if (a[i] == '1') {
      cnta[0]++;
    }
  }
  for (long long int i = 1; i < la - lb + 1; i++) {
    cnta[i] = cnta[i - 1];
    if (a[i - 1] == '1') {
      cnta[i] -= 1;
    }
    if (a[i + lb - 1] == '1') {
      cnta[i] += 1;
    }
  }
  long long int ans = 0;
  for (long long int i = 0; i < la - lb + 1; i++) {
    if (cnta[i] % 2 == cntb % 2) ans++;
  }
  cout << ans;
}
