#include <bits/stdc++.h>
using namespace std;
const int N = 1000010;
int p[N];
int main() {
  string str1, str2;
  cin >> str1 >> str2;
  int cnt = 0;
  memset(p, 0, sizeof(p));
  for (int i = 0; i < str2.size(); i++) {
    if (str2[i] == '1') cnt++;
  }
  for (int i = 1; i <= str1.size(); i++) {
    if (str1[i - 1] == '1') {
      p[i] = p[i - 1] + 1;
    } else {
      p[i] = p[i - 1];
    }
  }
  int ans = 0;
  for (int i = 0; i + str2.size() <= str1.size(); i++) {
    if ((p[i + str2.size()] - p[i]) % 2 == (cnt % 2)) ans++;
  }
  printf("%d", ans);
  return 0;
}
