#include int main(void){ long long int N; scanf("%lld",&N); printf("%lld\n",(((N/2+1)%1000007)*((N-N/2+1)%1000007-1))%1000007); return 0; }