i = int(input()) o = i % 1000000007 print(o)