Happy / Sad Number Calculation

Positive Integer =

 

Result =