#include <bits/stdc++.h>
using namespace std;
int main() {
  string a, b;
  cin >> a >> b;
  int len = b.length();
  bool flag = 0;
  for (int i = 1; i < len; i++)
    if (b[i] != b[i - 1]) flag ^= 1;
  bool flagB = 0;
  for (int i = 0; i < len; i++)
    if (a[i] != b[i]) flagB ^= 1;
  long long ans = 0;
  if (!flagB) ans++;
  for (int i = 1; i <= a.length() - len; i++) {
    flagB ^= flag;
    if (a[i + len - 1] != b[len - 1]) flagB ^= 1;
    if (a[i - 1] != b[0]) flagB ^= 1;
    if (!flagB) ans++;
  }
  cout << ans << endl;
  return 0;
}
