Let's say, you numbers are in range A2:A21.
Into second column enter the formula (p.e. into cell B2)
NB! The formula refers to next row in column A!
Copy the formula down into range B2:B21.
Into any cell where you want the end result, enter the formula
Code:
=SUMIF($B$2:$B$21,TRUE,$A$2:$A$21)