This is an easy question.
after getting b=0, we'll have to do little observation.
suppose i ask you to find how many pairs give sum equal to 2. answer is 1 way
again, how many pairs give sum equal to 3, answer is 2 ways
how many pairs give sum equal to 4 , answer is 3 ways.
similarly, how many pairs give sum equal to 8 , answer is 7 ways.
therefore, it is nothing but the sum of first 7 natural number starting from 1 which gives (7*8)/2= 28. answer.