#include using namespace std; const long long mod = 1000000007; int N,D[100100],L,inv[100100]={0,1}; int main() { scanf ("%d",&N); for (int i=1;i