Template:First nonzero

Returns the first value (in order given) that is not 0. Returns 0 if they all are. Supports up to 5 values.