Pupils hone math skills while helping animals