[Question]
  [
### Input:
An integer
### Output:
Sum of the input itself + the length of the input + each individual digit of the input.
```
nr + nr-length + {sum of digits} = output
```
### Examples:
Input: `99`  
Output: `99` (nr) `+ 2` (nr-length) `+ (9 + 9)` (digits) → `119`
Input: `123`  
Output: `123 + 3 + (1 + 2 + 3)` → `132`
### Challenge rules:
* The input can also contain negative input, which are resolved special. The `-`/minus-sign is also `+1` for the length, and is part of the first `digit`.  
For example: 
Input: `-123`  
Output: `-123 + 4 + (-1 + 2 + 3)` → `-115`
* You can assume that the input nor output will ever be outside the range of an (32-bit) integer.
### General rules:
* This is [code-golf](/questions/tagged/code-golf "show questions tagged 'code-golf'"), so shortest answer in bytes wins.  
Don't let code-golf languages discourage you from posting answers with non-codegolfing languages. Try to come up with an as short as possible answer for 'any' programming language.
* [Standard rules apply](https://codegolf.meta.stackexchange.com/questions/2419/default-for-code-golf-program-function-or-snippet/2422#2422) for your answer, so you are allowed to use STDIN/STDOUT, functions/method with the proper parameters and return-type, full programs. Your call.
* [Default Loopholes](https://codegolf.meta.stackexchange.com/questions/1061/loopholes-that-are-forbidden-by-default) are forbidden.
* If possible, please add a link with a test for your code.
* Also, please add an explanation if necessary.
### Test cases:
```
87901 → 87931
123 → 132
99 → 119
5 → 11
1 → 3
0 → 1
-3 → -4
-123 → -115
-900 → -905
-87901 → -87886
```
Semi-related: [Count Sum of all Digits](https://codegolf.stackexchange.com/questions/18556/count-sum-of-all-digits)
  
[Answer]
# Python 2, 39 bytes
```
lambda x:x+len(`x`)+eval("+".join(`x`))
```
[Test suite](https://repl.it/C78p)
Using the same eval-trick as in my [Pyth-answer](https://codegolf.stackexchange.com/a/84081/49110).
[Answer]
## 05AB1E, ~~28~~ ~~20~~ ~~18~~ 8 bytes
```
ÐgsS'+ýO
```
**Explanation**
```
Ð           # triplicate input
 g          # get length of input
  sS'+ý     # split input and merge with '+' as separator 
       O    # sum and implicitly display
```
[Try it online](http://05ab1e.tryitonline.net/#code=w5Bnc1MnK8O9Tw&input=LTEyMw)
Saved 10 bytes thanks to @Adnan
[Answer]
# Pyth, ~~11~~ 10 bytes
Thanks to @LeakyNun for a byte!
```
++vj\+`Ql`
```
[Test suite](http://pyth.herokuapp.com/?code=%2B%2Bvj%5C%2B%60Ql%60&input=-123&test_suite=1&test_suite_input=87901%0A123%0A99%0A5%0A1%0A0%0A-3%0A-123%0A-900%0A-87901&debug=0)
## Explanation
```
++vj\+`Ql`QQ  # Q = input, last two implicitly added
  vj\+`Q      # Join the input on '+' and eval it
        l`Q   # Length of the input
           Q  # The input itself
++            # Add those three values to obtain the result
```
[Answer]
# CJam, 18
```
q_,\~__Ab(@g*\~]:+
```
[Try it online](http://cjam.aditsu.net/#code=q_%2C%5C~__Ab(%40g*%5C~%5D%3A%2B&input=-123)
**Explanation:**
```
q_      read the input and make a copy
,\      get the string length and swap with the other copy
~__     evaluate the number and make 2 copies
Ab      convert to base A=10 (array of digits), it uses the absolute value
(       take out the first digit
@g*     get a copy of the number, get its sign and multiply with the digit
\~      dump the other digits on the stack
]:+     add everything together
```
[Answer]
# [Brachylog](https://github.com/JCumin/Brachylog), ~~35~~ 32 bytes
```
~~lL,?:ef+:?:L+I,(0>?h:2\*:Ir-:1+.;I.)~~
lL,(0>?h:1--I;I0),?b:ef+:?:L:I+.
```
### Explanation
```
lL,             L is the length of the Input
(
    0>?         Input < 0
       h:1--I   I is (First digit - 1) * -1
;               Or
    I0          I is 0
),
?b:ef+          Sum all digits of the Input
      :?:L:I+.  Output = sum of digits + (Input minus first digit) + L + I
```
[Answer]
# XSLT 1.0 (without EXSLT), 673 bytes
```
<transform xmlns="http://www.w3.org/1999/XSL/Transform" version="1.0"><output method="text"/><param name="i"/><template match="/"><variable name="d"><variable name="s">0<if test="0>$i">1</if></variable><variable name="d"><call-template name="d"><with-param name="i" select="substring($i,$s+2)"/></call-template></variable><value-of select="substring($i,1,$s+1)+$d"/></variable><value-of select="$i+string-length($i)+$d"/></template><template name="d"><param name="i"/>0<if test="$i!=''"><variable name="d"><call-template name="d"><with-param name="i" select="substring($i,2)"/></call-template></variable><value-of select="substring($i,1,1)+$d"/></if></template></transform>
```
Lightly inflated:
```
<transform xmlns="http://www.w3.org/1999/XSL/Transform" version="1.0">
    <output method="text"/>
    <param name="i"/>
    <template match="/">
        <variable name="d">
            <variable name="s">0<if test="0&gt;$i">1</if></variable>
            <variable name="d">
                <call-template name="d">
                    <with-param name="i" select="substring($i,$s+2)"/>
                </call-template>
            </variable>
            <value-of select="substring($i,1,$s+1)+$d"/>
        </variable>
        <value-of select="$i+string-length($i)+$d"/>
    </template>
    <template name="d">
        <param name="i"/>0<if test="$i!=''">
            <variable name="d">
                <call-template name="d">
                    <with-param name="i" select="substring($i,2)"/>
                </call-template>
            </variable>
            <value-of select="substring($i,1,1)+$d"/>
        </if>
    </template>
</transform>
```
Run using xsltproc:
```
xsltproc --param i -87901 ild.xsl ild.xsl
```
Yes, `ild.xsl` is passed twice: Once as the XSLT document and then as the XML document to be transformed. An input document must be present because an XSLT processor generally requires one to begin running. (XSLT is designed to define a transformation from an input document to an output document; running a transform solely with command-line parameters as I've done here is atypical.) For this program, any well-formed XML document will suffice as input, and, XSLT being an application of XML, any well-formed XSLT transform is by definition a well-formed XML document.
[Answer]
# 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
```
[Answer]
# Clojure, 102 bytes
```
(fn[n](load-string(str"(+ "n" "(count(str n))" "(apply str(map #(if(= % \-)%(str %" "))(str n)))")")))
```
Anonymous function which constructs a string that looks like `(+ -123 4 -1 2 3 )` and evals it. Everything pretty verbose as it is, construct string from number, its length, and then map each symbol of string representation of the number except minus to itself plus space and minus remains the same
You can see it running here: <https://ideone.com/FG4lsB>
[Answer]
# [Dyalog APL](http://goo.gl/9KrKoM), ~~19~~ ~~17~~ 16 [bytes](http://meta.codegolf.stackexchange.com/a/9429/43319)
```
≢+#⍎'\d'⎕R'&+',⊢
```
Takes string and returns
 `≢` length  
`+` plus  
 `#` in root namespace  
`⍎` evaluation of  
 `'\d'⎕R'&+'` regex append digits with a plus  
`,` followed by  
 `⊢` the unmodified string
–3 thanks to ngn
[Answer]
## Matlab, ~~76~~ 67 bytes
```
n=input('');t=num2str(n)-48;if(n<0)t(1)=0;t(2)=-t(2);end
n+sum(t+1)
```
9 bytes saved thanks to [@Luis Mendo](https://codegolf.stackexchange.com/users/36398/luis-mendo)
**Explanation:**
```
n=input('');     -- takes input
t=num2str(n)-48; -- makes it a string and then array of digits with "-" becoming -3 (48 is code for 0)
if(n<0)
t(1)=0;          -- set first element (-3) to 0
t(2)=-t(2);      -- the second element is the most significant digit, so we have to negate it
end
n+sum(t+1)       -- take sum of n, sum of all digits and length of t
                    (guaranteed by +1 of every element)
```
[Answer]
# dc, 57 bytes
```
dc -e"0 1?rdsc*d[1r]s+d0>+dZr[+la10~lc*rdsaZ1<A]sAdsaZ1<Ala+++f"
```
Explained:
```
0 1      # Push 0, then 1 on the stack
?        # Wait for input from stdin
         # If input is negative, the leading minus will subtract 1 from 0
r        # Swap (rotate) top two items on stack.
         # Stack status if input (`$') was...
         #       positive                    negative
         # TOP       1     <- coefficient ->    -1
         #           $                           $
         #           0
dsc      # Store a copy of coefficient in `c'
*        # Multiply input by coefficient:
         #  If input was positive, it stays positive.
         #  If input was negative, it's actually interpreted as positive.
         #   In this case, multiply by -1 to make it negative.
d        # Duplicate signed input
[1r]s+   # Define a function `+': Push 1 and rotate
d 0>+    # If input is negative, push 1 underneath the top of the stack
         # This 1 represents the length of the `-` in the input
         # Note that the stack now has 3 items on it, regardless of input sign
dZ       # Push the length of the input (not including leading minus)
r        # Rotate, moving a copy of the input to the top
[        # Begin function definition
 +       # Add top two items of stack
 la      # Load value from `a' (which holds nothing at time of function definition)
 10~     # Slice the last digit off `a' (spoiler: `a' is going to hold the input while
         #  we gather its digits)
 lc*     # Multiply digit by coefficient
         #  Since the input is signed, the input modulo 10 will have the same sign.
         #  We want all digits to be positive, except the leftmost digit, which should
         #   have the sign of the input.
         #  This ensures that each digit is positive.
 r       # Rotate: move remaining digits to top of stack
 dsa     # Store a copy of the remaining digits in `a'
 Z 1<A   # Count the number of digits left; if more than 1, execute A
]sA      # Store the function as `A'
d sa     # Store a copy of the input in `a'
         #  Props to you if you're still reading this
Z 1<A    # Count the number of digits left; if more than 1, execute A
la       # Load leftmost digit of input (still signed appropriately)
+++      # Add the top four items on the stack
f        # Dump stack
```
This was far more complicated than I had expected! Good challenge :)
[Answer]
## Bash + coreutils, 36 bytes
```
bc<<<$1+${#1}+$(sed s:\\B:+:g<<<0$1)
```
**Explanation:**
```
     $1+                      # the input number (+)
     ${#1}+                   # the length of the number, the '-' sign included (+)
     $(sed s:\\B:+:g<<<0$1)   # insert '+' between two consecutive word characters
                              #A word character is any letter, digit or underscore.
bc<<<                         # calculate the sum
```
In sed, `\B` also matches between two consecutive non-word characters, so for a negative number it matches between '^' and '-'. Note the `0$1` trick needed for `\B` to give `0-1+2+3`, for example.
**Run example:** 'input.txt' contains all the test cases in the question's statement
```
while read N;do echo "$N -> "$(./ILD_sum.sh "$N");done < input.txt
```
**Output:**
```
87901 -> 87931
123 -> 132
99 -> 119
5 -> 11
1 -> 3
0 -> 1
-3 -> -4
-99 -> -96
-123 -> -115
-900 -> -905
-87901 -> -87886
```
[Answer]
## PowerShell v4, 48 bytes
```
param($n)$n,"$n".length+[char[]]"$n"-join'+'|iex
```
This *should* work in v2+, but I only tested in v4.
Takes input `$n`. Creates a new array with the `,` operator consisting of `$n` and the `.length` when `$n` is converted to a string. Concatenates with that the string `$n` cast as a char-array. Then, that whole array is `-join`ed together with `+` before being piped to `iex` (similar to `eval`). The result is left on the pipeline and output is implicit.
For example, for input `-123`, the array would look like `(-123, 4, -, 1, 2, 3)`, and the string after the `-join` would look like `-123+4+-+1+2+3`. Then the `Invoke-Expression` happens, and the result is `-115` as expected.
[Answer]
# Factor with `load-all`, 175 bytes
Well, this is not very short. The special handling of unary minus is really annoying; I guess I could do it better and I will, maybe.
```
[ dup [ 10 >base length ] [ [ 10 >base >array [ 48 - ] V{ } map-as ] [ 0 < ] bi [ reverse dup pop* dup pop swap [ neg ] dip dup [ push ] dip ] [ ] if 0 [ + ] reduce ] bi + + ]
```
Using this substitution regex:
```
s/(-?[\d]+)\s*->\s*(-?[\d]+)/{ $2 } [ $1 calculate-ild ] unit-test/g
```
We can turn the OP's test cases into a Factor test suite.
```
USING: arrays kernel math math.parser sequences ;
IN: sum-ild
: sum-digits ( n -- x )
    [ number>string >array [ 48 - ] V{ } map-as ]
    [ 0 < ]
    bi
    [
      reverse dup pop* dup pop swap [ neg ] dip dup [ push ] dip
    ]
    [ ] if
    0 [ + ] reduce ;
: calculate-ild ( n -- x )
  dup
  [ number>string length ]
  [ sum-digits ]
  bi + + ;
USING: tools.test sum-ild ;
IN: sum-ild.tests
{ 87931 } [ 87901 calculate-ild ] unit-test
{ 132 } [ 123 calculate-ild ] unit-test
{ 119 } [ 99 calculate-ild ] unit-test
{ 11 } [ 5 calculate-ild ] unit-test
{ 3 } [ 1 calculate-ild ] unit-test
{ 1 } [ 0 calculate-ild ] unit-test
{ -4 } [ -3 calculate-ild ] unit-test
{ -115 } [ -123 calculate-ild ] unit-test
{ -905 } [ -900 calculate-ild ] unit-test
{ -87886 } [ -87901 calculate-ild ] unit-test
```
[Answer]
## C#, 118 bytes
```
int k(int a){var s=a.ToString();for(int i=0;i<s.Length;a+=s[i]<46?-(s[++i]-48)+ ++i-i:(s[i++]-48));return a+s.Length;}
```
[Answer]
# SpecBAS - 147 bytes
```
1 INPUT a$: l=LEN a$: b$="text "+a$+"+"+STR$ l+"+": FOR i=1 TO l: b$=b$+a$(i)+("+" AND i<l): NEXT i: EXECUTE b$
```
Builds up a string which then gets run. Unfortunately `EXECUTE` doesn't work with the `?` shorthand for `PRINT`, but `TEXT` saved 1 character.
[![enter image description here](https://i.stack.imgur.com/1oYXd.png)](https://i.stack.imgur.com/1oYXd.png)
[Answer]
# C#, 106 bytes
I beat java my a byte, my life is complete
```
int r(int n){var s=n+"";return n+s.Length+s.Select((k,j)=>int.Parse(s[k==45?1:j]+"")*(k==45?-2:1)).Sum();}
```
Ungolfed (kinda)
```
    public static int r(int n)
    {
            var s = n + "";
            return n + s.Length + s.Select((k, j) =>int.Parse(s[k==45?1:j]+"")*(k==45?-2:1)).Sum();
    }
```
[Answer]
# [Perl 5](https://www.perl.org/), 22 + 1 (-p) = 23 bytes
```
$_+=eval s//+/gr.y///c
```
[Try it online!](https://tio.run/##K0gtyjH9/18lXts2tSwxR6FYX19bP71Ir1JfXz/5/39DI@N/@QUlmfl5xf91CwA "Perl 5 – Try It Online")
[Answer]
# Java 8, ~~174~~ ~~136~~ ~~122~~ ~~107~~ ~~105~~ ~~93~~ 78 bytes
```
i->{int f=0;for(int j:(i+"").getBytes())i+=j<48?f++:f-->0?50-j:j-47;return i;}
```
-14 bytes thanks to *@LeakyNun*.  
-15 bytes thanks to *@cliffroot*.
**Explanation:**
[Try it online.](https://tio.run/##hZCxbsMgFEV3f8VTJpCFRdJEiU2dSNmbJWPVgRKIoA62AEeKIn@7i90OXSqWJ/Hukc59GH7npO2kNZevUTTce3jj2j4zAG2DdIoLCafpOS9AoGlqzOJmyOLwgQct4AQWahg12T8nQNWUqdbNsKmQzhcLXFxlOD6C9Ahjndfmdb07qDyvFCF7ethQYipD1lvmZOidBc2GkU2Grv9souFXdG/1BW6xIjoHp@31/QM4/ul3fvggb0Xbh6KLUWgssoVAu21Jl3hu/C@zXL0kiLJMAJuUIpHTRE5SDUn6CFLSpObPdw3ZMH4D)
```
i->{                   // Method with integer as both parameter and return-type
  int f=0;             //  Integer-flag, starting at 0
  for(int j:(i+"").getBytes())
                       //  Loop over the digits as bytes
    i+=                //   Increase the input with:
       j<48?           //    If the current byte is '-':
        f++            //     Increase the input with the flag-integer `f` (which is 0),
                       //     and increase the flag-integer `f` by 1 afterwards
       :               //    Else:
        f-->0?         //     If the flag-integer `f` is 1,
                       //     and decrease the flag-integer `f` back to 0 afterwards
         50-j          //      Increase it with 50 minus the current byte
        :              //    Else
         j-47;         //     Increase it with the byte as digit
                       //      + 1 to cover for the length part in ILD
  return i;}           //  Return the modified input as result
```
[Answer]
# [Thunno 2](https://github.com/Thunno/Thunno2) `s`, 7 [bytes](https://github.com/Thunno/Thunno2/blob/main/docs/codepage.md)
```
Ðls'+jE
```
[Try it online!](https://Not-Thonnu.github.io/run#aGVhZGVyPSZjb2RlPSVDMyU5MGxzJyUyQmpFJmZvb3Rlcj0maW5wdXQ9ODc5MDEmZmxhZ3M9cw==)
or
[verify all test cases](https://Not-Thonnu.github.io/run#aGVhZGVyPSZjb2RlPSVDMyU5MGxzJyUyQmpFJmZvb3Rlcj0maW5wdXQ9ODc5MDElMjAtJTNFJTIwODc5MzElMEExMjMlMjAtJTNFJTIwMTMyJTBBOTklMjAtJTNFJTIwMTE5JTBBNSUyMC0lM0UlMjAxMSUwQTElMjAtJTNFJTIwMyUwQTAlMjAtJTNFJTIwMSUwQS0zJTIwLSUzRSUyMC00JTBBLTEyMyUyMC0lM0UlMjAtMTE1JTBBLTkwMCUyMC0lM0UlMjAtOTA1JTBBLTg3OTAxJTIwLSUzRSUyMC04Nzg4NiZmbGFncz1Dcw==)
#### Explanation
```
Ðls'+jE  '# Implicit input
Ð         # Triplicate input
 l        # Push its length
  s       # Swap to get input
   '+j   '# Join on "+"
      E   # Evaluate as Python
          # Sum the stack
          # Implicit output
```
[Answer]
# Perl 6 - 30 bytes
As literal as it gets
```
{$^a+$^a.chars+[+]($^a.comb)}
```
Use it as an anonymous function
```
> {$^a+$^a.chars+[+]($^a.comb)}(99)
119 
```
[Answer]
## JavaScript (ES6), 38 bytes
```
n=>eval([n+=``,n.length,...n].join`+`)
```
Uses the old join-and-eval trick. Save 4 bytes if I can insist on string input:
```
f=
n=>eval([n,n.length,...n].join`+`)
;
```
```
<input type=number oninput=o.value=f(this.value)><input id=o readonly>
```
[Answer]
**C++, 255 Bytes**
```
#include <iostream>
#include <string>
#include <stdlib.h>
using namespace std;
int main(){
    string input;
    cin >> input;
    int sum = atoi(input.c_str()) + input.length();
    for(unsigned i = 0; i < input.length(); ++i)
        sum += input.at(i) - 48;
    return 0;
}
```
[Answer]
## Perl 5 - 37 Bytes
```
warn eval(join'+',/./g)+($_+=()=/./g)
```
Input is in $\_
[Answer]
## Javascript (using external library) (45 bytes)
Using a library I wrote to bring LINQ to Javascript, I was able to write the following:
```
(i)=>i+(i+"").length+_.From(i+"").Sum(x=>x|0)
```
[![enter image description here](https://i.stack.imgur.com/Hat03.png)](https://i.stack.imgur.com/Hat03.png)
[Answer]
# C, ~~132~~ ~~116~~ ~~113~~ 80
```
t,c;f(char*v){for(c=atoi(v+=t=*v==45);*v;t=0,++v)c+=t?50-*v-2*c:*v-47;return c;}
```
Function `f()` takes the input as a string and returns the result as an integer. Full program version (113 bytes):
```
t;main(int c,char**v){char*p=v[1];c=atoi(p+=t=*p==45);for(c=t?-c:c;*p;++p,t=0)c+=t?50-*p:*p-47;printf("%d\n",c);}
```
Requires one argument.
[Answer]
## Perl, 27 bytes
**22 bytes code + 5 for `-paF`.**
```
$"="+";$_+=@F+eval"@F"
```
### Explanation
Uses the `-a` autosplit option with an empty delimiter (`-F`) creating an array of the digits passed in. Uses the magic variable `$"` which controls which char is used to join an array when it's interpolated into a string (we use `"+"` here) and the fact that a list used in scalar context will return the length of the list (the number of digits).
### Usage
```
echo -n 99 | perl -paF -e'$"="+";$_+=@F+eval"@F"'
119
```
---
## Perl, 27 bytes
**22 bytes code + 5 for `-paF`.**
Alternative solution, that's a lot more readable for no more bytes. I prefer the other as it looks more cryptic!
```
$_+=@F+eval join"+",@F
```
[Answer]
## dc, 56 bytes
```
?dZrdd1sa[1+r0r-_1sa]sb0>b[A~rd0<x]dsxxrla*[+z1<y]dsyxp
```
No shorter than Joe's above, but a somewhat different implementation (and one that takes negative numbers as input vs. a subtraction command). Can probably be golfed more, but lunch only lasts so long.
```
?                #input
dZrdd            #find no. of digits, rotate to bottom of stack, dup input twice
1sa              #coefficient for first digit stored in register 'a'
[1+r0r-_1sa]sb   #macro 'b' executes on negative numbers. add one (for the neg. sign)
                 #rotate this value out of the way, leave a positive copy on top
0>b              #run the above macro if negative
[A~rd0<x]dsxx    #create and run macro 'x'; mod 10 to grab least significant digit
                 #keep doing it if quotient is greater than zero
rla*             #a zero remains in the way of our most significant digit, rotate it down
                 #and multiply said digit by our coefficient 'a' from earlier
[+z1<y]dsyx      #add two top stack values (we left that zero there to ensure this always
                 #works), check stack depth and keep doing it while there's stack
p                #print!
```
[Answer]
## R, 108 bytes
A bit late to the party again but here it goes:
```
s=strsplit(paste(n<-scan()),"")[[1]];n+nchar(n)+sum(as.integer(if(n<0)c(paste0(s[1],s[2]),s[1:2*-1])else s))
```
In order to generally split the digits of any number (e.g. to sum them), R requires us to first convert to a string and subsequently split the string into a string vector. To sum up the elements, the string vector has to be converted to numeric or integer. This together with the exception with the sum of a the digits of a negative number eats up a lot of bytes.
The exception can be golfed a bit (to 96 bytes) if warning messages are allowed.
```
s=as.integer(strsplit(paste(n<-scan()),"")[[1]]);if(n<0){s[2]=s[2]*-1;s=s[-1]};n+nchar(n)+sum(s)
```
In this case the string vector is converted to integer directly using `as.integer`. However, for negative numbers the first element in the vector will be a minus sign: `"-"`. This causes some trouble, e.g.: `as.numeric(c("-",1,2,3))` will return `NA 1 2 3` and a warning message. To circumvent this, remove the NA and then multiply the first element with `-1` before taking the sum. 
[Answer]
# RProgN, 30 Bytes
```
] '' . ] '-?.' | sum _ \ L + +
```
## Explination
```
]               # Clone the input
                #
'' . ]          # Convert it to a string, then clone it again.
'-?.' | sum     # Split it into chunks via the pattern '-?.' (A - if there is one, followed by a single character). Sum the resulting array.
_               # Floor the value, purely because I hate floats.
\ L + +         # Swap the top value with the value underneith it, to work with the string again. Get it's length, add the top, middle, and bottom, which is now the length, the sum and the input respectively.
```
[Try it Online!](https://tehflamintaco.github.io/Reverse-Programmer-Notation/RProgN.html?rpn=%5D%20%27%27%20.%20%5D%20%27-%3F.%27%20%7C%20sum%20_%20%5C%20L%20%2B%20%2B&input=-123)
]