How Do You Calculate Public Demand

How do you calculate public demand?

Individual 1         Individual 2      Individual 3

Price 8 qd 0      price 8 qd 1       price 8 qd 1      The answer should be 19 but i dont know how i got there.

p187654321 q100012345 p287654321 q212345678 p387654321 q300123456 Public demand124710131619