# coding: utf-8 # Here your code ! print(pow(int(input()),3)% (10**9+7))