import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); long N = sc.nextLong(); long sum = 0L; long mod = (long)Math.pow(10,9)+7; for(long i=0; i