Sum the two largest digits.
Are those digits to be unique?
Do it both ways.
In [1]:
# make a big number with many digits
s = list(str(2**100))
In [2]:
sorted(s)[-10:]
Out[2]:
In [3]:
# non-unique
sum(sorted(map(int, s), reverse=True)[:2])
Out[3]:
In [4]:
# unique
sum(sorted(map(int, set(s)), reverse=True)[:2])
Out[4]: