#include <bits/stdc++.h>
using namespace std;
const long long int MAX = 10000000;
const long long int mod = 1000000007;
long long int power(long long int a, long long int b, long long int m) {
  if (b == 0) return 1;
  if (b == 1) return a % m;
  long long int t = power(a, b / 2, m);
  t = (t * t) % m;
  if (b & 1) t = (t * a) % m;
  return t;
}
long long int modInverse(long long int a, long long int m) {
  return power(a, m - 2, m);
}
long long int gcd(long long int a, long long int b) {
  if (!a) return b;
  return gcd(b % a, a);
}
bool prime[MAX];
void sieve() {
  memset(prime, true, sizeof(prime));
  prime[0] = prime[1] = false;
  for (long long int p = 2; p * p <= MAX; p++) {
    if (prime[p] == true) {
      for (long long int i = p * 2; i <= MAX; i += p) prime[i] = false;
    }
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  ;
  string a, b;
  cin >> a >> b;
  long long int cb = 0;
  long long int n = a.size(), m = b.size();
  queue<long long int> q;
  long long int ca = 0;
  for (long long int i = 0; i < m; i++) {
    cb += (b[i] - '0');
    q.push(a[i] - '0');
    ca += (a[i] - '0');
  }
  long long int ans = 0;
  for (long long int i = 1; i < n - m + 1; i++) {
    if (ca % 2 == cb % 2) {
      ans++;
    }
    long long int x = q.front();
    q.pop();
    ca -= x;
    q.push(a[i + m - 1] - '0');
    ca += (a[i + m - 1] - '0');
  }
  if (ca % 2 == cb % 2) {
    ans++;
  }
  cout << ans << "\n";
  return 0;
}
