#include <bits/stdc++.h>
using namespace std;
struct de {
  int a, b;
} fr[105];
long long int a, b, c, d, sum, sum1, nr, n, i, k;
char ch;
int main() {
  cin >> n;
  for (i = 1; i <= n; i++) {
    cin >> ch;
    if (ch == '0' || ch == '2' || ch == '4' || ch == '6' || ch == '8') sum += i;
  }
  cout << sum;
  return 0;
}
