Assalomu alaykum, hech kim D masalani ishlay olmagani uchun  faqatgina D masalaning kodini qo'yishga qaror qildim.

tub = []; 
def sieve(n): 
	a = [True] * (n + 1); 
	p = 2; 
	while (p * p <= n): 
		if (a[p] == True): 
			for i in range(p * 2, n + 1, p): 
				a[i] = False; 
		p += 1; 
	for p in range(2, n + 1): 
		if (a[p]): 
			tub.append(p); 
def solution(n): 
	sieve(n); 
	cnt = 1; 
	for i in range(len(tub)): 
		p = tub[i]; 
		r = 0; 
		while (p <= n):
			r = r + int(n / p); 
			p = p * tub[i]; 
		cnt = int(cnt * (pow(tub[i], r + 1) - 1) /(tub[i] - 1)); 
	return cnt; 
n = int(input())
s = solution(n)
print(s%1000000007)