#include <stdio.h> int main() { long int n,i; scanf("%ld",&n); if(n<3) { if(n=2) printf("3"); } else { long int a[n]; a[0]=3; for(i=1;i<n-1;i++) a[i]=a[i-1]+i; long int temp=a[n-2]%1000000007; printf("%ld",temp); } printf("\n"); return 0; }
int runTheTest(int input)
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)