# Arup Guha
# 1/5/2013
# Solution to Programming Knights Practice Program Chapter 3 Problem 1
# Summing Even Numbers

def main():

    # Get the user input.
    n = int(input("Enter a positive even integer.\n"))

    # Add the desired numbers.
    total = 0
    for i in range(2,n+1,2):
        total = total + i;

    # Another way to solve the problem, using the sum of an arithmetic series.
    # Note: This is faster...
    alternateSolution = (n//2)*(n//2 + 1)

    print("The desired sum is ", total, ".", sep="");
    print("The direct solution yields ", alternateSolution, ".", sep="")


main()
