#include <bits/stdc++.h>
using namespace std;
mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());
template <class my>
inline my aabs(const my &a) {
  return (a > 0) ? a : -a;
}
inline long long int gcd(long long int a, long long int b) {
  return (b == 0) ? a : gcd(b, a % b);
}
inline long long int LSOne(long long int k) { return (k & (-k)); }
long long int modpow(long long int base, long long int exp,
                     long long int modulus) {
  base %= modulus;
  long long int result = 1;
  while (exp > 0) {
    if (exp & 1) result = (result * base) % modulus;
    base = (base * base) % modulus;
    exp >>= 1;
  }
  return result;
}
inline int inv(long long int o, int m = 1000000007) {
  int b = m, u = 0, v = 1, t, a = o % m;
  while (a) {
    t = b / a;
    b -= t * a;
    swap(a, b);
    u -= t * v;
    swap(u, v);
  }
  if (u < 0) u += m;
  return u;
}
inline int add(const int &a, const int &b) {
  return a + b >= 1000000007 ? a + b - 1000000007 : a + b;
}
inline int sub(const int &a, const int &b) {
  return a - b < 0 ? a - b + 1000000007 : a - b;
}
inline int mul(const int &a, const int &b) {
  return int(a * 1ll * b % 1000000007);
}
inline int _div(const int &a, const int &b) { return mul(a, inv(b)); }
inline int pow(int a, int b) {
  int ans = 1;
  while (b) {
    if (b & 1) ans = mul(ans, a);
    a = mul(a, a);
    b >>= 1;
  }
  return ans;
}
void solve() {
  int n, m, k, q, u, v, a = 0, b, c, d = 0, ans1 = 0, ans2, val;
  char s[1000010], t[1000010];
  cin >> s;
  cin >> t;
  n = strlen(s);
  m = strlen(t);
  for (int i = 1; i < m; i++)
    if (t[i] != t[i - 1]) d ^= 1;
  for (int i = 0; i < m; i++)
    if (s[i] != t[i]) a ^= 1;
  if (a == 0) ans1++;
  for (int i = m; i < n; i++) {
    if (s[i - m] != t[0]) a ^= 1;
    a ^= d;
    if (s[i] != t[m - 1]) a ^= 1;
    if (a == 0) {
      ans1++;
    }
  }
  cout << ans1 << "\n";
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  cout << "\n";
  int t = 1;
  while (t--) solve();
}
