':type n: int
:rtype: int'

def findCelebrity(self, n):

    candidate = 0
    for i in xrange(1, n):
        if knows(candidate, i):
            candidate = i
    for i in xrange(n):
        if ((i != candidate) and (knows(candidate, i) or (not knows(i, candidate)))):
            return (-1)
    return candidate
