#include <bits/stdc++.h>
int main() {
  int n;
  scanf("%d", &n);
  char s[n];
  for (int i = 0; i < n; i++) scanf(" %c", &s[i]);
  int l, r, m = 0;
  for (int k = 0; k < n; k++) {
    if (s[k] == '2' || s[k] == '4' || s[k] == '6' || s[k] == '8') {
      r = k;
      {
        for (int i = 0; i <= k; i++) {
          m++;
        }
      }
    }
  }
  printf("%d", m);
}
