We need to maximize e = rs. Since r + s = n, we can write e = r(n - r). Note that the graph of e against r is a parabola with intercepts 0 and n on the horizontal (r) axis, and a maximum when r = n/2. Now r has to be an integer so this requires n to be even.The maximum value of e is ( n/2 )2.
If n is odd, then the maximum will ocurr when r is as close to n/2 as posible, i.e., when r = (n-1)/2 or r = (n+1)/2. In either case the maximum value is e = (n - 1)(n + 1)/4.