number = input() ans = int(number) % 1000000007 print(ans)