import sys import math N=int(input()) print((N-1)%1000000007)