N = int(input()) P = 10 ** 9 + 7 inv = pow(2,P-2,P) ans = inv * N % P * N % P print(ans)