#MATL, 20 bytes tVtnw48-PZ}t0<?x_]vs [**Try it Online**](http://matl.tryitonline.net/#code=dFZ0bnc0OC1QWn10MDw_eF9ddnM&input=OTk) [All test cases](http://matl.tryitonline.net/#code=YGkKdFZ0bnc0OC1QWn10MDw_eF9ddnMKRFRd&input=ODc5MDEKMTIzCjk5CjUKMQowCi0zCi0xMjMKLTkwMAotODc5MDE) **Explanation** % Implicitly grab the input tV % Duplicate the input and convert to a string tn % Duplicate and find the length of this string w % Flip the top two stack elements to get us the string again 48- % Subtract 48 (ASCII 'O'). Yields a negative number for a negative sign % and digits otherwise P % Flip the resulting array Z} % Break the array up so each element is pushed to the stack t0<? % If the first character was a negative sign x_ % Pop the negative sign off the stack and negate the first digit ] % End of if vs % Vertically concatenate and sum all stack contents % Implicitly display the result