#include <bits/stdc++.h>
using namespace std;
template <class C>
inline void maxi(C& a4, C b4) {
  a4 = max(a4, b4);
}
template <class C>
inline void mini(C& a4, C b4) {
  a4 = min(a4, b4);
}
const int INF = 1E9 + 7;
int n;
string s;
unsigned int dp[100011];
int main() {
  ios_base::sync_with_stdio(false);
  cout << fixed << setprecision(12);
  cin >> n >> s;
  dp[0] = 1;
  for (int q = 0; q < (n); q++) {
    int z = min(q + 4, n - q + 4);
    for (int i = (z); i >= (1); i--) dp[i] = dp[i - 1];
    dp[0] = 0;
    if (s[q] == '?')
      for (int i = (0); i <= (z); i++) dp[i] += dp[i + 2];
    for (int i = 0; i < (4); i++) dp[z + i + 1] = 0;
  }
  int cnt = 0;
  for (__typeof((s).begin()) i = (s).begin(); i != (s).end(); ++i)
    cnt += (*i == '?' ? 1 : -1);
  if (cnt >= 0)
    for (int _ = 0; _ < (cnt / 2); _++) dp[0] *= 25;
  cout << dp[0] << endl;
}
