def triangular(n):
    return n*(n+1)/2 if n > 0 else 0

#solution 2
def triangular(n):
    return (0, ((n * n) + n) / 2)[bool(n>0)]
cfd6e5a567695d2c20ac75dbd657f51f4e963f38
<mask token>

<mask token>


def triangular(n):
    return (0, (n * n + n) / 2)[bool(n > 0)]

def triangular(n):
    return n * (n + 1) / 2 if n > 0 else 0


def triangular(n):
    return (0, (n * n + n) / 2)[bool(n > 0)]

def triangular(n):
    return n*(n+1)/2 if n > 0 else 0

#solution 2
def triangular(n):
    return (0, ((n * n) + n) / 2)[bool(n>0)]