Skip to main content
3 of 9
added 3 characters in body
micsthepick
  • 411
  • 4
  • 14

Python 2, 83 79 bytes

x=input()
print sum(len(str(i))for i in(range(x+1)if x>0 else range(0,x-1,-1)))
micsthepick
  • 411
  • 4
  • 14