/* -*- coding: utf-8 -*- * * 1682.cc: No.1682 Unfair Game - yukicoder */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; /* constant */ const int MOD = 1000000007; /* typedef */ typedef long long ll; /* global variables */ /* subroutines */ int powmod(int a, int n) { // a^n % MOD int pm = 1; while (n > 0) { if (n & 1) pm = (ll)pm * a % MOD; a = (ll)a * a % MOD; n >>= 1; } return pm; } /* main */ int main() { int n; scanf("%d", &n); int c0 = 0, c1 = 0; for (int i = 0; i < n; i++) { int pi; scanf("%d", &pi); if (pi < 50) c0++; else if (pi > 50) c1++; } if (c1 == 0) puts("0"); else printf("%d\n", powmod(2, c0 + c1 - 1)); return 0; }