Pyt, 1717 15 bytes
Đб~⁺₂⇹Å*⇹ÅřǰąŁ⁺+б⁺0⇹?ŕ⇹:ŕ;ŘǰąŁ
Try it online!Try it online!
ĐĐ Đ implicit input; Đuplicate twice
± get sign
~⁺₂ ⁺ negate, increment, divide by 2
⇹ 0 swap top two items onpush stack0
⇹ Å swap top two getitems
Åbsolute value
? * if top of stack is multiplytruthy:
ŕ⇹ ⇹ ŕemove top of stack; swap top two items on stack
Å get Åbsolute value
:ŕ ř otherwise: ŕemove top of řangifystack
ǰ ; ǰoin withouteither delimitersway:
ą Ř convert to ąrray of charactersŘangify
ǰ Ł ǰoin with getno Łengthdelimiters
⁺ ą incrementconvert (accountingto forąrray printingof 0)characters
+Ł get add;Łength; implicit print