Buggy python submission (verdict: Runtime Error):
import sys
sys.setrecursionlimit(100000)

N, A, B = map(int, input().split())
mo = 10 ** 9 + 7
def hanaya(n, x):
    if x == 1:
        return n
    else:
        return ((hanaya(n, x-1))*((n-x+1)/x))%mo
    
ans = (pow(2, N, mo) - 1 - hanaya(N, A)- hanaya(N, B)) % mo
print(int(ans))

Fixed submission:
N, A, B = map(int, input().split())
mo = 1000000007
A_val = 1
for i in range(A):
    A_val = ((A_val * (N - i) * pow(i+1, mo-2, mo))) % mo
B_val = 1
for i in range(B):
    B_val = ((B_val * (N - i) * pow(i+1, mo-2, mo))) % mo
    
ans = (pow(2, N, mo) - 1 - A_val - B_val) % mo
print(ans)

Buggy python submission (verdict: Runtime Error):
N, A, B = map(int, input().split())
mo = 10 ** 9 + 7
def hanaya(n, x):
    if x == 1:
        return n
    else:
        return ((int((hanaya(n, x-1))*((n-x+1)/x))%mo))

ans = (pow(2, N, mo) - 1 - hanaya(N, A)- hanaya(N, B)) % mo
print(int(ans))

Fixed submission:
N, A, B = map(int, input().split())
mo = 1000000007
A_val = 1
for i in range(A):
    A_val = ((A_val * (N - i) * pow(i+1, mo-2, mo))) % mo
B_val = 1
for i in range(B):
    B_val = ((B_val * (N - i) * pow(i+1, mo-2, mo))) % mo
    
ans = (pow(2, N, mo) - 1 - A_val - B_val) % mo
print(ans)

Buggy python submission (verdict: Runtime Error):
N, A, B = map(int, input().split())
mo = 10 ** 9 + 7
def hanaya(n, x):
    if x == 1:
        return n
    else:
        return (((hanaya(n, x-1))*((n-x+1)/x))%mo)

ans = (pow(2, N, mo) - 1 - hanaya(N, A)- hanaya(N, B)) % mo
print(int(ans))

Fixed submission:
N, A, B = map(int, input().split())
mo = 1000000007
A_val = 1
for i in range(A):
    A_val = ((A_val * (N - i) * pow(i+1, mo-2, mo))) % mo
B_val = 1
for i in range(B):
    B_val = ((B_val * (N - i) * pow(i+1, mo-2, mo))) % mo
    
ans = (pow(2, N, mo) - 1 - A_val - B_val) % mo
print(ans)

Buggy python submission (verdict: Runtime Error):
N, A, B = map(int, input().split())
mo = 10 ** 9 + 7
from functools import lru_cache
@lru_cache(maxsize=10000000)
def hanaya(n, x):
    if x == 1:
        return n
    else:
        return int(((hanaya(n, x-1))*((n-x+1)/x))%mo)

ans = (pow(2, N, mo) - 1 - hanaya(N, A)- hanaya(N, B)) % mo
print(int(ans))

Fixed submission:
N, A, B = map(int, input().split())
mo = 1000000007
A_val = 1
for i in range(A):
    A_val = ((A_val * (N - i) * pow(i+1, mo-2, mo))) % mo
B_val = 1
for i in range(B):
    B_val = ((B_val * (N - i) * pow(i+1, mo-2, mo))) % mo
    
ans = (pow(2, N, mo) - 1 - A_val - B_val) % mo
print(ans)

Buggy python submission (verdict: Runtime Error):
N, A, B = map(int, input().split())
mo = 10 ** 9 + 7
from functools import lru_cache
@lru_cache(maxsize=10000000)
def hanaya(n, x):
    if x == 1:
        return n
    else:
        return int(((hanaya(n, x-1))*((n-x+1)/x))%mo)

ans = (pow(2, N) - 1 - hanaya(N, A)- hanaya(N, B)) % mo
print(int(ans))

Fixed submission:
N, A, B = map(int, input().split())
mo = 1000000007
A_val = 1
for i in range(A):
    A_val = ((A_val * (N - i) * pow(i+1, mo-2, mo))) % mo
B_val = 1
for i in range(B):
    B_val = ((B_val * (N - i) * pow(i+1, mo-2, mo))) % mo
    
ans = (pow(2, N, mo) - 1 - A_val - B_val) % mo
print(ans)

Buggy python submission (verdict: Runtime Error):
N, A, B = map(int, input().split())
mo = 10 ** 9 + 7
def hanaya(n, x):
    if x == 1:
        return n
    else:
        return int(((hanaya(n, x-1))*((n-x+1)/x))%mo)

ans = (pow(2, N) - 1 - hanaya(N, A)- hanaya(N, B)) % mo
print(int(ans))

Fixed submission:
N, A, B = map(int, input().split())
mo = 1000000007
A_val = 1
for i in range(A):
    A_val = ((A_val * (N - i) * pow(i+1, mo-2, mo))) % mo
B_val = 1
for i in range(B):
    B_val = ((B_val * (N - i) * pow(i+1, mo-2, mo))) % mo
    
ans = (pow(2, N, mo) - 1 - A_val - B_val) % mo
print(ans)

Buggy python submission (verdict: Runtime Error):
N, A, B = map(int, input().split())
mo = 10 ** 9 + 7
from functools import lru_cache
@lru_cache(maxsize=10000000)
def hanaya(n, x):
    if x == 1:
        return n
    else:
        return int(((hanaya(n, x-1))*((n-x+1)/x))%mo)

ans = (pow(2, N) - 1 - hanaya(N, A)- hanaya(N, B)) % mo
print(int(ans))

Fixed submission:
N, A, B = map(int, input().split())
mo = 1000000007
A_val = 1
for i in range(A):
    A_val = ((A_val * (N - i) * pow(i+1, mo-2, mo))) % mo
B_val = 1
for i in range(B):
    B_val = ((B_val * (N - i) * pow(i+1, mo-2, mo))) % mo
    
ans = (pow(2, N, mo) - 1 - A_val - B_val) % mo
print(ans)

Buggy python submission (verdict: Runtime Error):
N, A, B = map(int, input().split())
mo = 10 ** 9 + 7
from functools import lru_cache
@lru_cache(maxsize=10000000)
def hanaya(n, x):
    if x == 1:
        return n
    else:
        return int(((hanaya(n, x-1))*((n-x+1)/x))%mo)

ans = (pow(2, N) - 1 - hanaya(N, A)- hanaya(N, B)) % mo
print(int(ans))

Fixed submission:
N, A, B = map(int, input().split())
mo = 1000000007
A_val = 1
for i in range(A):
    A_val = ((A_val * (N - i) * pow(i+1, mo-2, mo))) % mo
B_val = 1
for i in range(B):
    B_val = ((B_val * (N - i) * pow(i+1, mo-2, mo))) % mo
    
ans = (pow(2, N, mo) - 1 - A_val - B_val) % mo
print(ans)

Buggy python submission (verdict: Runtime Error):
N, A, B = map(int, input().split())
mo = 10 ** 9 + 7
def hanaya(n, x):
    if x == 1:
        return n
    else:
        return ((hanaya(n, x-1))*((n-x+1)/x))%mo

ans = (pow(2, N) - 1 - hanaya(N, A)- hanaya(N, B)) % mo
print(int(ans))

Fixed submission:
N, A, B = map(int, input().split())
mo = 1000000007
A_val = 1
for i in range(A):
    A_val = ((A_val * (N - i) * pow(i+1, mo-2, mo))) % mo
B_val = 1
for i in range(B):
    B_val = ((B_val * (N - i) * pow(i+1, mo-2, mo))) % mo
    
ans = (pow(2, N, mo) - 1 - A_val - B_val) % mo
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
N, A, B = map(int, input().split())

def cmb(n, k, mod, fac, ifac):
    k = min(k, n-k)
    return fac[n] * ifac[k] * ifac[n-k] % mod


def tables(mod, n):
    fac = [1, 1] 
    ifac = [1, 1] 
    inverse = [0, 1] 

    for i in range(2, n+1):
        fac.append((fac[-1] * i) % mod)
        inverse.append((-inverse[mod % i] * (mod//i)) % mod)
        ifac.append((ifac[-1] * inverse[-1]) % mod)
    return fac, ifac

mo = 10 ** 9 +7
fac, ifac = tables(mo, N)
ans = (pow(2, N) - 1 - cmb(N, A, mo, fac, ifac) - cmb(N, B, mo, fac, ifac)) % mo
print(ans)

Fixed submission:
N, A, B = map(int, input().split())
mo = 1000000007
A_val = 1
for i in range(A):
    A_val = ((A_val * (N - i) * pow(i+1, mo-2, mo))) % mo
B_val = 1
for i in range(B):
    B_val = ((B_val * (N - i) * pow(i+1, mo-2, mo))) % mo
    
ans = (pow(2, N, mo) - 1 - A_val - B_val) % mo
print(ans)