Problem:
Score : 400 points

Problem Statement

Akari has n kinds of flowers, one of each kind.

She is going to choose one or more of these flowers to make a bouquet.

However, she hates two numbers a and b, so the number of flowers in the bouquet cannot be a or b.

How many different bouquets are there that Akari can make?

Find the count modulo (10^9 + 7).

Here, two bouquets are considered different when there is a flower that is used in one of the bouquets but not in the other bouquet.

Constraints

All values in input are integers.

2 \leq n \leq 10^9

1 \leq a < b \leq \textrm{min}(n, 2 \times 10^5)

Input

Input is given from Standard Input in the following format:

n a b

Output

Print the number of bouquets that Akari can make, modulo (10^9 + 7). (If there are no such bouquets, print 0.)

Sample Input 1

4 1 3

Sample Output 1

7

In this case, Akari can choose 2 or 4 flowers to make the bouquet.

There are 6 ways to choose 2 out of the 4 flowers, and 1 way to choose 4, so there are a total of 7 different bouquets that Akari can make.

Sample Input 2

1000000000 141421 173205

Sample Output 2

34076506

Print the count modulo (10^9 + 7).

Solution in C# (Mono 4.6.2.0) (judge verdict: Wrong Answer)

using System;
using System.Text;
using System.Linq;
using System.Collections;
using System.Collections.Generic;
using static System.Console;
using static System.Math;

namespace AtCoder
{
    public class Program
    {
        public static void Main(string[] args)
        {
            new Program().Solve(new ConsoleInput(Console.In,' '));
        }

        public long mod = 1000000007;

        public void Solve(ConsoleInput cin)
        {
            var N = cin.ReadLong;
            var A = cin.ReadLong;
            var B = cin.ReadLong;
            long allPatern = PowOnMod(2,N) - 1 ;
            long exePaternA = Conbination(N,A);
            long exePaternB = Conbination(N,B);
            long exePatern = exePaternA + exePaternB;
            allPatern %= mod;
            exePatern %= mod;
            long ans = allPatern - exePatern;
            ans %= mod;
            if(ans < 0) ans += mod;

            WriteLine(ans);
        }

        public long PowOnMod(long a , long n){
            if(n == 0)
            {
                return 1;
            } else if (n == 1)
            {
                return a % mod;
            }else if(n % 2 == 0)
            {
                long result = PowOnMod(a,n/2);
                result %= mod;
                return result * result % mod ;
            }else{
                long result = PowOnMod(a,n/2);
                result %= mod;
                return result * result % mod * a % mod;
            }
        }

        public long Conbination(long N , long R){
            if(N/2 < R) R = N -R;
            var result = Permition(N,R) % mod * PowOnMod(Permition(R,R),mod-2) % mod;
            result %= mod;
            //WriteLine("Combination: N :" + N + "  R : " + R + " result : " + result);
            return result;
        }

        public long Permition(long N,long M){
            long result = N;
            for(var i = 1; i <= M - 1 ; i++){
                result *= (N-i) % mod;
                result %= mod;
                if(result < 0) result += mod;
            }
            if(result < 0) result += mod;
            //WriteLine("Permition: N :" + N + "  M : " + M + " result : " + result);
            return result ;
        }
    }


    public class ConsoleInput
    {
        private readonly System.IO.TextReader _stream;
        private char _separator = ' ';
        private Queue<string> inputStream;
        public ConsoleInput(System.IO.TextReader stream,char separator = ' ')
        {
            this._separator = separator;
            this._stream = stream;
            inputStream = new Queue<string>();
        }

        public string Read
        {
            get
            {
                if(inputStream.Count != 0) return inputStream.Dequeue();
                string[] tmp = _stream.ReadLine().Split(_separator);
                for(int i = 0;i < tmp.Length;i++)
                    inputStream.Enqueue(tmp[i]);
                return inputStream.Dequeue();
            }
        }

        
        public string ReadLine { get { return _stream.ReadLine(); }}
        public int ReadInt { get { return int.Parse(Read); }}
        public long ReadLong { get { return long.Parse(Read); }}
        public double ReadDouble { get { return double.Parse(Read); }}
        public string[] ReadStrArray(long N) { var ret = new string[N]; for (long i = 0; i < N; ++i) ret[i] = Read; return ret;}
        public int[] ReadIntArray(long N) { var ret = new int[N]; for (long i = 0; i < N; ++i) ret[i] = ReadInt; return ret;}
        public long[] ReadLongArray(long N) { var ret = new long[N]; for (long i = 0; i < N; ++i) ret[i] = ReadLong; return ret;}
    }

}