#include <bits/stdc++.h>
using namespace std;
int main() {
  char ch;
  long long n;
  cin >> n;
  unsigned long long sum = 0;
  for (long long i = 1; i <= n; i++) {
    cin >> ch;
    if (ch % 2 == 0) {
      sum += i;
    }
  }
  cout << sum << endl;
  return 0;
}
