def main(): N = int(input()) print(3**N/4**(N-1)) if __name__ == "__main__": main()