#include <bits/stdc++.h>   using namespace std;   long long ans = 0;   string str;   int n;   int main() {     ios::sync_with_stdio(false);     cin >> n;     cin >> str;     for (int i = 0; i < n; ++i) ans += (str[i] -  0 ) & 1 ? 0 : i + 1;     cout << ans << endl;     return 0;   }   