#include <bits/stdc++.h>
using namespace std;
using std::vector;
int main() {
  int m = 0, i = 1, n;
  cin >> n;
  string s;
  cin >> s;
  for (auto &c : s) {
    if ((c - 48) % 2 == 0) m += i;
    i++;
  }
  cout << m;
}
