#include <bits/stdc++.h>
using namespace std;
string a, b;
int len1, len2;
int ans, diff;
int now;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cin >> a >> b;
  len1 = a.length();
  len2 = b.length();
  if (len2 == 1) {
    for (char i : a) ans += i == b[0];
    cout << ans << '\n';
    return 0;
  }
  for (int i = len2 - 2; i >= 0; i--) {
    if (b[i] != b[i + 1]) diff++;
  }
  for (int i = 0; i < len2; i++) now += a[i] != b[i];
  diff &= 1;
  ans += now % 2 == 0;
  for (int i = 1; i + len2 - 1 < len1; i++) {
    now += a[i - 1] != b[0];
    now += a[i + len2 - 1] != b.back();
    now += diff;
    ans += !(now %= 2);
  }
  cout << ans << '\n';
  return 0;
}
