n = input().strip()k = len(n)if k == 1: print(9)else: print(k * (k + 1) // 2)
2
9
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!