_ = readLine()!
var a = readLine()!.split(separator: " ").compactMap { Int($0) }

for i in 0..<a.count - 1 {
    let curr = a[i]
    let next = a[i + 1]
    if curr <= 0 && next < 0 {
        a[i] *= -1
        a[i + 1] *= -1
    } else if curr < 0 && next >= 0 {
        if -curr >= next {
            a[i] *= -1
            a[i + 1] *= -1
        }
    }
}

print(a.reduce(0, +))
