#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  string s1, s2;
  cin >> s1 >> s2;
  long long n1 = s1.size(), n2 = s2.size();
  long long cnt2 = 0;
  for (long long i = 0; i < n2; i++) {
    cnt2 = cnt2 + (s2[i] - '0');
  }
  vector<long long> a(n1, 0);
  a[0] = s1[0] - '0';
  for (long long i = 1; i < n1; i++) {
    a[i] = a[i - 1] + (s1[i] - '0');
  }
  long long ans = 0;
  for (long long i = n2 - 1; i < n1; i++) {
    long long x;
    if (i != n2 - 1)
      x = a[i] - a[i - n2];
    else
      x = a[i];
    if (x % 2 == cnt2 % 2) {
      ans++;
    }
  }
  cout << ans;
}
