#include <bits/stdc++.h>
using namespace std;
const long long N = 200005;
const long long p = 1e9 + 7;
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  string a, b;
  cin >> a >> b;
  long long pre[N] = {};
  long long ct = b.length() - a.length() + 1;
  for (long long i = 0; i < b.length(); i++) pre[i + 1] = pre[i] + b[i] - '0';
  long long ans = 0;
  for (long long i = 0; i < a.length(); i++) {
    if (a[i] == '0') {
      long long cur = pre[ct + i] - pre[i];
      ans += cur;
    } else {
      long long cur = pre[ct + i] - pre[i];
      ans += ct - cur;
    }
  }
  cout << ans;
  return 0;
}
