#include #include #include #include #include #include #include #include #include #include #include #include using namespace std; typedef long long int ll; typedef unsigned long long ull; constexpr ll mod=1e6+7; int main(){ cin.tie(nullptr); ios::sync_with_stdio(false); ll n; cin >> n; if(n%2==0){ cout << ((n/2+1)%mod*(n/2+1)-1+mod)%mod << endl; } else{ ll m=n/2; cout << ((m+1)%mod*(n-m+1)%mod-1+mod)%mod << endl; } }