# Summation computes the summation, 0 + 1 + ..upto.. + n,
# of a non-negative input int, n.
n = int(raw_input("Type a nonnegative int: "))
if n < 0 :
print "Sorry, negatives not allowed"
else :
total = 0
count = 0
while count != n :
# invariant: total == 0 + 1 + ..upto.. + count
# WHAT COMMANDS DO I WRITE HERE TO PRESERVE THE INVARIANT ?
# ????
pass
# Here, we have
# (i) the invariant: total == 0 + 1 + ..upto.. + count
# (ii) not(count != n), that is, count==n
#
# We conclude: total == 0 + 1 + ..upto.. + n
# Success!
print total