#include using namespace std; typedef long long ll; #define all(x) (x).begin(),(x).end() const int mod=1000000007; int main(){ ll N;cin>>N; cout<