how to get the sum of dissimilar fraction