Find S Algorithm Using Python To Calculate