package no072; import java.math.BigInteger; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); BigInteger n = new BigInteger(sc.next()); BigInteger half = n.divide(new BigInteger("2")); System.out.println( half.add(BigInteger.ONE).multiply(n.subtract(half).add(BigInteger.ONE)).subtract(BigInteger.ONE) .remainder(new BigInteger("1000007")) ); } }