<reponame>Norbert2808/programming
startList = [1] * 10

def endList(half):
    previousList, nextList = [], []
    if half == 1:
        tmp = []
        tmp.extend(startList)
        return tmp
    else: previousList = endList(half - 1)
    for i in range(9):
        previousList.append(0)
    for i in range(len(previousList)):
        value, count = 0, i
        while count >= 0 and i - count <= 9:
            value += previousList[count]
            count -= 1
        nextList.append(value)
    return nextList

def nInput():
    while True:
        try:
            n = int(input("Enter n: "))
            if n < 2 or n > 100 or n % 2 != 0:
                print("Input must be in border [2;100] and to divide by 2!")
                continue
        except ValueError:
            print("Not the correct value!")
            continue
        break
    return n

def resNumber(n):
    resList = endList((n / 2))
    result, lenRes = 0, len(resList)
    for i in range(lenRes//2):
        result += resList[i]*resList[i]
    result *= 2
    if lenRes % 2 == 1:
        result += resList[lenRes//2]*resList[lenRes//2]
    return result

if __name__ == "__main__":
    n = nInput()
    result = resNumber(n)
    print(result)