#include <bits/stdc++.h>
using namespace std;
int main() {
  int x, y = 0;
  cin >> x;
  string A;
  char z;
  cin >> A;
  for (int i = 0; A[i] != '\0'; i++) {
    z = A[i];
    x = A[i] - 48;
    if (x % 2 == 0) y += i + 1;
  }
  cout << y;
  return 0;
}
