
#Michael Pu
#2016/10/21
#ICS2O1
#Ms.Strelkovska
#Repetition Exercises A

#Input
num = int(input("Enter the number: "))

#Calculations
total = 0
i = 1
while i <= num:
    print(i)
    total = total + i
    i = i + 1

print("Sum of numbers from 1 to",num,"is",total)

