#include <bits/stdc++.h>
using namespace std;
int store[2000007], ones = 0;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  string big, small;
  cin >> big >> small;
  if (big[0] == '1')
    store[0] = 1;
  else
    store[0] = 0;
  for (int i = 1; i < big.size(); ++i)
    store[i] = (int)(big[i] - '0') + store[i - 1];
  for (int i = 0; i < small.size(); ++i) {
    ones += (int)(small[i] - '0');
  }
  int ans = 0;
  if ((ones % 2) == (store[small.size() - 1] % 2)) ++ans;
  for (int i = small.size(); i < big.size(); ++i)
    if (((store[i] - store[i - small.size()]) % 2) == (ones % 2)) ++ans;
  cout << ans;
  return 0;
}
