since the USA and NATO have spent at least an acknowledged $1.5 billion on supporting and rearming the Ukrainian army from 2014 to 2019 -you could then on that basis suggest at least $2 billion up to 2022. I would strongly suspect those figures could be significantly increased.
European expenditure is another $30 billion Such investment meant a 50% expansion of Ukraine's military since 2014, and much improvement in effectiveness with training.
So I would say if all that investment hadn't worked, you might wonder about its effectiveness. Of course, Ukraine will still "lose" and ultimately NATO will have decide whether to declare war on Russia or not.