Buggy python submission (verdict: Time Limit Exceeded):
import sys

class modNumber:
    prime = 10**9 + 7
    def __init__(self, num):
        self.num = num % modNumber.prime

    def __add__(self, other):
        if type(other) is int:
            return modNumber(self.num + other)
        return modNumber(self.num + other.num)

    def __sub__(self, other):
        if type(other) is int:
            return modNumber(self.num - other)
        return modNumber(self.num - other.num)

    def __mul__(self, other):
        if type(other) is int:
            return modNumber(self.num * other)
        return modNumber(self.num*other.num)

    def __truediv__(self, other):
        if type(other) is int:
            return modNumber(self.num + modNumber(other).reciprocal())
        return (self*other.reciprocal())

    def __pow__(self, power, modulo=None):
        if type(power) is int:
            answer = 1
            base = self.num
            while True:
                if power == 0:
                    return modNumber(answer)
                elif power%2 == 0:
                    power = power//2
                    base = base*base % modNumber.prime
                else:
                    power = power // 2
                    answer = answer * base % modNumber.prime
                    base = base*base % modNumber.prime
        return self.num.__pow__(power)

    def __str__(self):
        return str(self.num)

    def __int__(self):
        return self.num

    def reciprocal(self):
        ans = modNumber(1)
        buffer = modNumber(self.num)
        exp = modNumber.prime - 2
        while exp:
            if exp & 1:
                ans = ans * buffer
            buffer = buffer * buffer
            exp = exp >> 1
        return ans

if __name__ == '__main__':
    n, a, b = map(int, input().split())

    total = modNumber(2)**n - 1
    C = modNumber(1)
    for i in range(1, b + 1):
        C = C*modNumber(n-(i-1))/modNumber(i)
        if i == a:
            total -= C
    total -= C

    print(total)

Fixed submission:
import sys

class modNumber:
    prime = 10**9 + 7
    def __init__(self, num):
        self.num = num % modNumber.prime

    def __add__(self, other):
        if type(other) is int:
            return modNumber(self.num + other)
        return modNumber(self.num + other.num)

    def __sub__(self, other):
        if type(other) is int:
            return modNumber(self.num - other)
        return modNumber(self.num - other.num)

    def __mul__(self, other):
        if type(other) is int:
            return modNumber(self.num * other)
        return modNumber(self.num*other.num)

    def __truediv__(self, other):
        if type(other) is int:
            return modNumber(self.num + modNumber(other).reciprocal())
        return (self*other.reciprocal())

    def __pow__(self, power, modulo=None):
        if type(power) is int:
            answer = 1
            base = self.num
            while True:
                if power == 0:
                    return modNumber(answer)
                elif power%2 == 0:
                    power = power//2
                    base = base*base % modNumber.prime
                else:
                    power = power // 2
                    answer = answer * base % modNumber.prime
                    base = base*base % modNumber.prime
        return self.num.__pow__(power)

    def __str__(self):
        return str(self.num)

    def __int__(self):
        return self.num

    def reciprocal(self):
        ans = modNumber(1)
        buffer = modNumber(self.num)
        exp = modNumber.prime - 2
        while exp:
            if exp & 1:
                ans = ans * buffer
            buffer = buffer * buffer
            exp = exp >> 1
        return ans

if __name__ == '__main__':
    n, a, b = map(int, input().split())

    total = modNumber(2)**n - 1
    # a を引く
    denom = modNumber(1)  # 分母
    numer = modNumber(1)  # 分子
    for i in range(1, a+1):
        denom = denom*i
    for i in range(n-a+1, n+1):
        numer = numer*i
    total -= numer/denom
    # b を引く
    denom = modNumber(1)  # 分母
    numer = modNumber(1)  # 分子
    for i in range(1, b+1):
        denom = denom*i
    for i in range(n-b+1, n+1):
        numer = numer*i
    total -= numer/denom


    print(total)