Create a program that accepts a list, A, consisting of N distinct elements as input. This program will calculate and display a special sum, denoted as S, using the following procedure:
Read the input from STDIN and print the output to STDOUT. Do not write arbitrary strings while reading the input or while printing, as these contribute to the standard output.