result = - a+b-c+d; Output 20 You need change value positive not negative