3379

Problem ID: 3379

- The limit value for the intermediate numbers is 1.000.000. Not 10.000.000 as it states in the problem description.
- The input can contain values greater than 10.000.000 (namely 12345678). Your solution should process it correctly.
- If S and D are equal you should print zero as the answer to the query.
- S or D can be zero then the answer should be -1.