If your cost basis in a particular stock is truly zero, and yet the program won't accept that when you attempt to input exactly $0, then we would suggest that you instead enter your stock basis as $0.01, or even $1.
That won't materially change the overall taxation result of your tax return (i.e., it won't raise or lower your income tax refund or liability by a single dollar), yet will still give the program something to use for its internal calculation functions. Mathematically speaking, sometimes multiplying or dividing by zero produces strange output results, and for that reason is not allowed as a valid number. However, using some other positive figure, of a negligible value, will achieve the same practical outcome, without violating the rules of the program.
Thus, we would helpfully suggest that when you make your input for cost basis, you use either $0.01 or $1 as your amount. That should resolve the issue.
Thank you for asking this question.