#include #include #include #include #include #include #include int bellNumber(int n) { int bell[n+1][n+1]; bell[0][0] = 1; for (int i=1; i<=n; i++) { bell[i][0] = bell[i-1][i-1]; for (int j=1; j<=i; j++) bell[i][j] = bell[i-1][j-1] + bell[i][j-1]; } return bell[n][0]; } int main(){ int n; scanf("%d",&n); int *m = malloc(sizeof(int) * n); for(int m_i = 0; m_i < n; m_i++){ scanf("%d",&m[m_i]); } printf("%d", bellNumber(8) % 1000000007); return 0; }