#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 10;
int ps[N];
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  string s1, s2;
  cin >> s1 >> s2;
  int t1 = s1.size(), t2 = s2.size();
  for (int i = 0; i < t1 - 1; i++) {
    ps[i + 1] = ps[i] + int(s1[i] != s1[i + 1]);
  }
  int ans = 0, cnt = 0;
  for (int i = 0; i < t2; i++) {
    if (s1[i] != s2[i]) cnt++;
  }
  cnt %= 2;
  ans += int(cnt == 0);
  for (int i = t2; i < t1; i++) {
    cnt += ps[i] - ps[i - t2];
    cnt %= 2;
    ans += int(cnt == 0);
  }
  cout << ans;
}
