#include <bits/stdc++.h>
using namespace std;
int main() {
  string s1;
  cin >> s1;
  string s2;
  cin >> s2;
  long long count[s1.length() - s2.length() + 1];
  long long c = 0;
  for (long long i = 0; i < s2.length(); i++) {
    if (s1[i] != s2[i]) c++;
  }
  count[0] = c;
  long long cx = 0;
  for (long long i = 1; i < s2.length(); i++)
    if (s1[i] != s1[i - 1]) cx++;
  if (s1[s2.length()] != s1[s2.length() - 1]) cx++;
  count[1] = cx;
  for (long long i = 2; i <= s1.length() - s2.length(); i++) {
    long long a = 0;
    long long b = 0;
    if (s1[i - 1] != s1[i - 2]) a = 1;
    if (s1[i + s2.length() - 1] != s1[i + s2.length() - 2]) b = 1;
    count[i] = count[i - 1] - a + b;
  }
  long long k = 0;
  long long sum = 0;
  for (long long kk = 0; kk < 1 + s1.length() - s2.length(); kk++) {
    sum += count[kk];
    if (sum % 2 == 0) k++;
  }
  cout << k;
  return 0;
}
