def simpleeq(data):
    """
    You are given four positive integers: A, B, C, N. If 0 ≤ a ≤ A, 0 ≤ b ≤ B 
    and 0 ≤ c ≤ C, using these integers you should try to calculate the number 
    of possible solutions to the following equation: a + b + c ≤ N.
    """
    numberofsols=0
    for a in range(data[0]+1):
        for b in range(data[1]+1):
            for c in range(data[2]+1):
                if (a+b+c<=data[3]):numberofsols+=1
                
    return numberofsols