import java.util.Scanner; public class Main{ public static Long fib(long n) { long i = n; long ans = 0; while(true){ ans += i; i--; if(i == 0){ break; } } return ans; } public static void main(String[] args){ Scanner s = new Scanner(System.in); long n = Long.parseLong(s.next()); long fib1 = fib(n); long fib2 = fib(fib1); long ans = fib2 % ((long) Math.pow(10, 9)) + 7; System.out.println(ans); s.close(); } }