function [flops] = hw2bfn(r,c,v,m,n,x)

   flops = 0;
   for i = 1:n
      b(i,1) = 0;
   end

   for k = 1:m
      b(r(k),1) = b(r(k),1)+v(k)*x(c(k),1);
      flops = flops+2;
   end

end
