n = int(input()) mod = 10**6+7 x = n//2+1 y = (n+1)//2+1 print((x*y-1)%mod)