Take the Swiss approach. Allow the people to be armed, and to keep their arms at home. 27% of the Polish people would still be about 10 million people, which would be more riflemen than the whole Russian army.
But be sure to not keep any records of privately purchased weapons, which invaders would use for confiscation.
Indeed, Switzerland would be a wonderful role model for whats left of the Ukraine.
In fact, all of eastern Europe would be well advised to adopt a more independent and neutral stance in the world.