import java.util.Scanner; public class No72 { public static final long mod = 1000007; public static void main(String[] args) { Scanner sc = new Scanner(System.in); long N = sc.nextLong(); long x; if(N % 2 == 0) { x = N/2; }else { x =(N-1)/2; } long a = (x+1) % mod; long b = (N-x+1) % mod; if((a*b) % mod == 0) { System.out.println(mod -1); }else { System.out.println((a*b) % mod - 1); } } }