#include <bits/stdc++.h>
long long mod = 1e9 + 7;
void fail() {
  std::cout << ":(\n";
  exit(0);
}
using namespace std;
const long long N = 505;
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  string a, b;
  cin >> a >> b;
  long long already = 0, ans = 0, cnt = 0;
  for (long long i = 0; i < b.size() - 1; i++)
    if (b[i] != b[i + 1]) already++;
  for (long long i = 0; i < b.size(); i++) {
    if (a[i] != b[i]) cnt++;
  }
  cnt %= 2;
  if (!cnt) ans++;
  char ch = b[b.size() - 1];
  long long n = b.size();
  for (long long i = b.size(); i < a.size(); i++) {
    cnt += already;
    cnt += (ch != a[i]);
    cnt += (b[0] != a[i - n]);
    cnt %= 2;
    ans += (!cnt);
  }
  cout << ans << '\n';
  return 0;
}
