Three Basic Algorithm Math Example