#include <bits/stdc++.h>
using namespace std;
const long long LINF = 0x3f3f3f3f3f3f3f3f;
const long long NLINF = 0xf7f7f7f7f7f7f7f7;
const int INF = 0x3f3f3f3f, NINF = 0xf7f7f7f7;
const int MOD1 = 1e9 + 7, MOD2 = 1e9 + 9;
const int N = 1e6 + 5;
int sza, szb, ans = 0, s[N];
char a[N], b[N];
int main() {
  scanf("%s %s", a + 1, b + 1);
  sza = strlen(a + 1), szb = strlen(b + 1);
  for (int i = 1; i < sza; i++) s[i] = s[i - 1] + (a[i] != a[i + 1]);
  int par = 0;
  for (int i = 1; i <= szb; i++)
    if (a[i] != b[i]) par++;
  par %= 2;
  for (int i = 1; i <= sza - szb + 1; i++) {
    ;
    ans += !par;
    if ((s[i + szb - 1] - s[i - 1]) % 2) par ^= 1;
  }
  printf("%d\n", ans);
}
