Number of ways in which N can be represented as the sum of two positive integers | Function to return the number of distinct ways to represent n as the sum of two integers ; Driver code
def ways ( n ) : NEW_LINE INDENT return n // 2 NEW_LINE DEDENT n = 2 NEW_LINE print ( ways ( n ) ) NEW_LINE