Let \( S = a + b + c \). Then the expression is \[ R = \frac{S + d}{S - d}. \]
For a fixed \(S\), \(R\) increases with \(d\); for a fixed \(d\), \(R\) decreases as \(S\) grows. Also, to keep \(R > 0\) we need \(S > d\). Hence, to maximize \(R\) choose \(d\) as large as possible and \(S\) just greater than \(d\).
Take \(d = 25\) (largest allowed). We need the smallest \(S = a + b + c\) with three distinct numbers not using 25 such that \(S > 25\). Using \(1, 2, 23\) gives \(S = 26\) (minimal possible \( > 25\)). Then \[ R = \frac{26 + 25}{26 - 25} = \frac{51}{1} = 51. \]
Trying \(d = 24\) gives maximum \[ \frac{25 + 24}{25 - 24} = 49, \] which is smaller.
\[ \boxed{51} \]