def main(): n = int(input()) en = (4*(10**n)-1) // 3 print(en % 1000000007) if __name__ == '__main__': main()