I want to calculate how much bitcoin was lost forever.
This doesn't prove anything: Bitcoins that have never moved are not necessarily lost, and Bitcoins that have been moved can still be lost later on.
Could You advice how You get all balances with 25 or 50 BTC from this Big CSV file?
i used some standard (Linux) command line tools:
cat balances_489359.csv | grep ';5000000000' | grep -v 0000000000 > /tmp/50.txt
The first grep gets all lines that contain "5000000000", the second grep gets rid of the lines that have an additional zero (aka 500 BTC). The output goes to a txt-file.
Command line tools are very convenient to process large amounts of text, this line takes less than a second.