#include <bits/stdc++.h>
using namespace std;
char a[1000100], b[1000100];
int main() {
  scanf("%s %s", a + 1, b + 1);
  int n = strlen(a + 1);
  int m = strlen(b + 1);
  int st = 0;
  for (int i = 1; i <= m; i++) st += b[i] - '0';
  st %= 2;
  int sum = 0;
  for (int i = 1; i <= m; i++) sum += a[i] - '0';
  sum %= 2;
  int ans = 0;
  if (sum == st) ans++;
  for (int i = 2; i <= n - m + 1; i++) {
    sum -= a[i - 1] - '0';
    sum += a[i + m - 1] - '0';
    sum = (sum % 2 + 2) % 2;
    if (sum == st) ans++;
  }
  cout << ans << endl;
  return 0;
}
