Numbers = [1, 2, 3, 10]
Maximum = 13
Array = [0 for i in xrange(0, Maximum + 1)]
Array[0] = 1
for CurrentNum in Numbers:
for Num in xrange(Maximum - CurrentNum, -1, -1):
if (Array[Num]):
Array[Num + CurrentNum] += 1
print Array[Maximum]
TnVtYmVycyA9IFsxLCAyLCAzLCAxMF0KTWF4aW11bSA9IDEzCkFycmF5ID0gWzAgZm9yIGkgaW4geHJhbmdlKDAsIE1heGltdW0gKyAxKV0KQXJyYXlbMF0gPSAxCmZvciBDdXJyZW50TnVtIGluIE51bWJlcnM6CiAgICBmb3IgTnVtIGluIHhyYW5nZShNYXhpbXVtIC0gQ3VycmVudE51bSwgLTEsIC0xKToKICAgICAgICBpZiAoQXJyYXlbTnVtXSk6CiAgICAgICAgICAgIEFycmF5W051bSArIEN1cnJlbnROdW1dICs9IDEKCnByaW50IEFycmF5W01heGltdW1d