#Project Euler Question 76
#How many different ways can one hundred be written as a sum of at least two positive integers?


import itertools

def summation(x):
    dict_list = dict()
    for n in range(2, x+1):
        dict_list.update({n: [n//2]})

    for m in range(3, x+1):
        space = 3
        for l in range(1, m-1):
            try:
                diff = dict_list[m-space][l]
                space += 1
            except KeyError:
                diff = 0
                pass
            except IndexError:
                diff = 0
                pass
            dict_list[m].append(dict_list[m-1][l-1] + diff)

    return sum(dict_list[x])


print (summation(100))