Read a natural number n and compute its alternating digit sum,
starting from the most significant digit (leftmost) with a + sign;
signs then alternate: +, -, +, -, ...
For the number 12345, the alternating sum is 1 - 2 + 3 - 4 + 5 = 3.