#include <bits/stdc++.h>
using namespace std;
int n;
const int maxn = 65000 + 1;
int a = 0;
int main() {
  cin >> n;
  string s;
  cin >> s;
  for (int i = 0; i < n; i++) {
    if (s[i] % 2 == 0) {
      a += i;
      a += 1;
    }
  }
  cout << a << endl;
  return 0;
}
