#include #define ll long long using namespace std; int main(){ int N; cin >> N; vector a(N); for(int i=0; i> a[i]; ll mod = 1e9+7; ll ans = 0; ll c = 1; for(int i=0; i