Sold shares of a stock this yr (non-covered), 500 were inherited, rest came from div re-investments over 20 qtrs. 1099-B shows one sale for 650 shares. How do I report?

Since there are inherited shares and purchase price of div re-investment shares is different every quarter seems like I'd need to list 21 transactions to make up the 650 shares.