n=int(input()) tong=45 s=n%10 x=n//10 if n<10: print((n+1)n//2) else: tong+=((s+1)s//2)+((s+1)(n//10)) if n>=20: tong+=+55(x-1) print(tong)