/* package whatever; // don't place package name! */
import java.util.*;
import java.lang.*;
import java.io.*;
/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
{
Scanner in
=new Scanner
(System.
in); int n;
double sum=0, p;
n=in.nextInt();
for(int i=1; i<=n; i++){
p=in.nextDouble(); //вводим значение а
if(i%2==1)//определяем его знак и сумируем
sum+=p;
else
sum+=-p;
}
System.
out.
print("Sum: " + sum
); }
}
LyogcGFja2FnZSB3aGF0ZXZlcjsgLy8gZG9uJ3QgcGxhY2UgcGFja2FnZSBuYW1lISAqLwoKaW1wb3J0IGphdmEudXRpbC4qOwppbXBvcnQgamF2YS5sYW5nLio7CmltcG9ydCBqYXZhLmlvLio7CgovKiBOYW1lIG9mIHRoZSBjbGFzcyBoYXMgdG8gYmUgIk1haW4iIG9ubHkgaWYgdGhlIGNsYXNzIGlzIHB1YmxpYy4gKi8KY2xhc3MgSWRlb25lCnsKCXB1YmxpYyBzdGF0aWMgdm9pZCBtYWluIChTdHJpbmdbXSBhcmdzKSB0aHJvd3MgamF2YS5sYW5nLkV4Y2VwdGlvbgoJewoJCVNjYW5uZXIgaW49bmV3IFNjYW5uZXIoU3lzdGVtLmluKTsKCQlpbnQgbjsKCQlkb3VibGUgc3VtPTAsIHA7CgkJbj1pbi5uZXh0SW50KCk7CgkJZm9yKGludCBpPTE7IGk8PW47IGkrKyl7CgkJCXA9aW4ubmV4dERvdWJsZSgpOyAvL9Cy0LLQvtC00LjQvCDQt9C90LDRh9C10L3QuNC1INCwCgkJCWlmKGklMj09MSkvL9C+0L/RgNC10LTQtdC70Y/QtdC8INC10LPQviDQt9C90LDQuiDQuCDRgdGD0LzQuNGA0YPQtdC8CgkJCQlzdW0rPXA7CgkJCWVsc2UKCQkJCXN1bSs9LXA7Cgl9IAoJU3lzdGVtLm91dC5wcmludCgiU3VtOiAiICsgc3VtKTsKCX0KfQ==