def sum_series(n):
    if n <= 0:
        return 0
    total = 0
    while n > 0:
        total += n
        n -= 2
    return total