#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 9;
char s[N], b[N];
int a[N], tot;
int main() {
  scanf("%s", s + 1);
  scanf("%s", b + 1);
  int n = strlen(s + 1), l = strlen(b + 1), ans = 0;
  for (int i = 1; i <= n; i++) {
    a[i] = a[i - 1];
    if (s[i] == '0') a[i]++;
  }
  for (int j = 1; j <= l; j++)
    if (b[j] == '0') tot++;
  for (int i = 1; i <= n; i++) {
    if ((i + l - 1) > n) break;
    int o = a[i + l - 1] - a[i - 1];
    if (abs(o - tot) % 2 == 0) ans++;
  }
  cout << ans;
}
