Returns count of ways n people can remain single or paired up .
def countFriendsPairings ( n ) : NEW_LINE INDENT ones = n NEW_LINE twos = 1 NEW_LINE ans = 0 NEW_LINE while ( ones >= 0 ) : NEW_LINE DEDENT