n = int(raw_input()) if n == -1: print '2**(n-1)*7/3' else: print 2 ** (n - 1) * 7 / 3