#include <bits/stdc++.h>
using namespace std;
int comm[1000001];
vector<int> idx[2];
int main() {
  string a, b;
  cin >> a >> b;
  int n = a.size();
  for (int i = 0; i < a.size(); i++) {
    if (a[i] == '1') comm[i]++;
  }
  for (int i = 1; i < n; i++) {
    comm[i] += comm[i - 1];
  }
  int num = 0, m = b.size(), counter = 0;
  for (int i = 0; i < b.size(); i++)
    if (b[i] == '1') num++;
  for (int i = 0; i + m - 1 < n; i++) {
    if (i == 0) {
      if (comm[i + m - 1] % 2 == num % 2) counter++;
    } else {
      if ((comm[i + m - 1] - comm[i - 1]) % 2 == num % 2) {
        counter++;
      }
    }
  }
  cout << counter;
}
