Maybe a comment as to why this calculation?  Is it possible to have one of the attributes less than 10?