#include <bits/stdc++.h>
using namespace std;
int32_t main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  string a, b;
  cin >> a >> b;
  char prev = b[0];
  bool flip = 0;
  for (auto &i : b) {
    if (i != prev) flip ^= 1;
    prev = i;
  }
  bool curr = 1;
  long long ans = 0;
  for (long long i = 0; i < b.size(); i++) {
    if (a[i] != b[i]) curr ^= 1;
  }
  ans += curr;
  for (long long i = b.size(); i < a.size(); i++) {
    curr ^= flip;
    if (a[i] != b.back()) curr ^= 1;
    if (a[i - b.size()] != b[0]) curr ^= 1;
    ans += curr;
  }
  cout << ans;
  return 0;
}
