#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:66777216")
using namespace std;
const int N = 100007;
unsigned int dp[2][N];
char st[N];
int n;
int main() {
  scanf("%d%s", &n, st);
  dp[0][0] = 1;
  unsigned int coef = 25;
  for (int i = 1; i <= n; ++i) {
    int now = (i & 1);
    int pre = 1 - now;
    int i1 = i - 1;
    for (int j = i % 2 + 2; j <= i; j += 2) {
      dp[now][j] = 0;
      if (st[i1] == '?') {
        dp[now][j] = dp[pre][j + 1] + coef * dp[pre][j - 1];
      } else {
        dp[now][j] = dp[pre][j - 1];
      }
    }
    if (i % 2 == 0) {
      if (st[i1] == '?') {
        dp[now][0] = dp[pre][1];
      } else {
        dp[now][0] = 0;
      }
    } else {
      if (st[i1] == '?') {
        dp[now][1] = dp[pre][2] + 25 * dp[pre][0];
      } else {
        dp[now][1] = dp[pre][0];
      }
    }
  }
  cout << dp[n & 1][0] << endl;
  return 0;
}
