stablegradients/pie-gem5-bysrc huggingface dataset:
// Original C++ solution (slower):
#include <bits/stdc++.h>

using namespace std;

#define endl              "\n"

#define pb              push_back

#define fir               first

#define sec               second

#define all(v)            ((v).begin()), ((v).end())

#define sz(v)            ((int)((v).size()))

#define ll              long long

#define ld              long double

#define lp(i, n)        for(int i = 0 ; (int)i<n ; i++)

#define loop(i, x, n)       for(int i=x ; (int)i<=n ; i++)

#define isPowerOfTwo(s) (!(s & (s-1)))

typedef vector<int> vi;

typedef deque<int> de;

void origi() {

    ios_base::sync_with_stdio(false);

    cin.tie(nullptr), cout.tie(nullptr);

}

int dig(int n) {

    int re = 0;

    while (n > 0)

        n /= 10, re++;

    return re;

}

void tiranga() {

    int n;

    cin >> n;

    int arr[] = { 0,9,0,909,0,90909 };

    if (!(dig(n) % 2))

        cout << arr[dig(n) - 1];

    else {

        int digits = dig(n);

        if (digits == 1)

            cout << n;

        else {

            int res = arr[digits - 2];

            int temp = 1;

            lp(i, digits - 1)

                temp *= 10;

            res += n - temp;

            cout << ++res;

        }

    }

}

int main() {

#ifndef ONLINE_JUDGE.

    //freopen("input.txt", "r", stdin);

#else

#endif

    

    origi();

    tiranga();

    //cout << sumOfDig(123654);

   // genLarge(10, 10);

   // genSmall(10);



}


// Optimized solution to the same problem (faster):
#include<stdio.h>

int main()

{

    int n, i , x, y,sum = 0;



    scanf("%d", &n);



    if(n > 0 && n < 10)

    {

        for(i = 0; i < n ; i++)

        {

            sum++;

        }

        printf("%d\n",sum);

    }

    else if(n >= 10 && n <= 99)

        printf("9\n");

    else if(n > 99 && n < 1000)

    {

        x = n - 90;

        printf("%d\n",x);

    }

    else if(n > 999 && n < 10000)

    {

        printf("909\n");

    }

    else if(n > 9999 && n < 100000)

    {

        y = n - 9090 ;

        printf("%d\n", y);

    }

    else if(n > 99999)

        printf("90909\n");



    return 0;

}


// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<bits/stdc++.h>

using namespace std;

#define ll long long

int main()

{

    ll n,p,q,ct,x,z;

    cin>>n;

    ct=0;

    for(ll i=1;i<=n;i++)

    {

        x=i; z=0;

        while(x!=0)

        {

            x=x/10; z++;

        }

        if(z%2==1) ct++;

    }

    cout<<ct<<endl;

}


// Optimized solution to the same problem (faster):
#include<stdio.h>

int main()

{

    int n, i , x, y,sum = 0;



    scanf("%d", &n);



    if(n > 0 && n < 10)

    {

        for(i = 0; i < n ; i++)

        {

            sum++;

        }

        printf("%d\n",sum);

    }

    else if(n >= 10 && n <= 99)

        printf("9\n");

    else if(n > 99 && n < 1000)

    {

        x = n - 90;

        printf("%d\n",x);

    }

    else if(n > 999 && n < 10000)

    {

        printf("909\n");

    }

    else if(n > 9999 && n < 100000)

    {

        y = n - 9090 ;

        printf("%d\n", y);

    }

    else if(n > 99999)

        printf("90909\n");



    return 0;

}


// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<bits/stdc++.h>

using namespace std;

int main()

{

    int n,c,s=0;

    cin>>n;

    int i,temp;

    for(i=1;i<=n;i++)

    {

        temp=i;c=0;

        while(temp!=0)

        {

            temp=temp/10;

            c++;

        }

        if(c%2==1) s++;

    }

    cout<<s<<endl;

    return 0;

}








// Optimized solution to the same problem (faster):
#include<stdio.h>

int main()

{

    int n, i , x, y,sum = 0;



    scanf("%d", &n);



    if(n > 0 && n < 10)

    {

        for(i = 0; i < n ; i++)

        {

            sum++;

        }

        printf("%d\n",sum);

    }

    else if(n >= 10 && n <= 99)

        printf("9\n");

    else if(n > 99 && n < 1000)

    {

        x = n - 90;

        printf("%d\n",x);

    }

    else if(n > 999 && n < 10000)

    {

        printf("909\n");

    }

    else if(n > 9999 && n < 100000)

    {

        y = n - 9090 ;

        printf("%d\n", y);

    }

    else if(n > 99999)

        printf("90909\n");



    return 0;

}


// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<bits/stdc++.h>

using namespace std;

typedef long long int ll;

int main()

{

    ll n,g,x,t,h,k=0,f,l=0;

    cin>>n;

    if(n < 10)

    {

        cout<<n<<endl;

    }

    else if(n < 100)

    {

        cout<<"9"<<endl;

    }

    else if(n < 1000)

    {

        cout<<n-90<<endl;

    }

    else if(n < 10000)

    {

        cout<<"909"<<endl;

    }

    else if(n >= 10000 && n < 100000)

    {

        cout<<n-9090<<endl;

    }

    else if(n == 100000)

    {

        cout<<n-9091<<endl;

    }



}


// Optimized solution to the same problem (faster):
#include<stdio.h>

int main()

{

    int n, i , x, y,sum = 0;



    scanf("%d", &n);



    if(n > 0 && n < 10)

    {

        for(i = 0; i < n ; i++)

        {

            sum++;

        }

        printf("%d\n",sum);

    }

    else if(n >= 10 && n <= 99)

        printf("9\n");

    else if(n > 99 && n < 1000)

    {

        x = n - 90;

        printf("%d\n",x);

    }

    else if(n > 999 && n < 10000)

    {

        printf("909\n");

    }

    else if(n > 9999 && n < 100000)

    {

        y = n - 9090 ;

        printf("%d\n", y);

    }

    else if(n > 99999)

        printf("90909\n");



    return 0;

}


// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<bits/stdc++.h>

#pragma GCC optimize ("Ofast")

#pragma GCC optimize("O3")

#define lll __int128_t

#define ll long long int

#define FOR(i,a,b) for(ll (i)=(a);i<(ll)(b);i++)

#define FORr(i,a,b) for(ll(i)=(a);i>(ll)(b);i--)

#define rep(i,n) FOR(i,0,n)

#define rep1(i,n) FOR(i,1,n)

#define outi(a) printf("%lld\n",(a))

#define case(i) cout << "Case " << i << ": ";

#define pb push_back

#define in(n) ll n = read();

#define show(arr) for(auto a : arr) cout << a << " "; cout << endl;

#define inp(arr, n) ll arr[n] ; rep(i,n) arr[i] = read();

#define mp make_pair

#define f first 

#define s second 

#define mod 1000000007

#define modu(a) if(a>=mod) a-=mod;

#define test int tt = read(); rep(i,tt) solve(i+1);

using namespace std;

inline ll read()

{

    ll x=0; static ll p; p=1; static char c; c=getchar();

    while (!isdigit(c)) { if (c=='-') p=-1; c=getchar(); }

    while ( isdigit(c)) { x=(x<<1)+(x<<3)+(c-48); c=getchar(); }

    x*=p;

    return x;

}

int solve(int tt);

int main()

{

    //system("clear");

   // freopen("input.txt", "r", stdin);

   ll ans = 0;

  in(N);

  rep1(i,N+1)

  {

      ll q = log10(i)+1;

      if(q&1) ans++;

  }

  cout << ans <<endl;

}

// Optimized solution to the same problem (faster):
#include<stdio.h>

int main()

{

    int n, i , x, y,sum = 0;



    scanf("%d", &n);



    if(n > 0 && n < 10)

    {

        for(i = 0; i < n ; i++)

        {

            sum++;

        }

        printf("%d\n",sum);

    }

    else if(n >= 10 && n <= 99)

        printf("9\n");

    else if(n > 99 && n < 1000)

    {

        x = n - 90;

        printf("%d\n",x);

    }

    else if(n > 999 && n < 10000)

    {

        printf("909\n");

    }

    else if(n > 9999 && n < 100000)

    {

        y = n - 9090 ;

        printf("%d\n", y);

    }

    else if(n > 99999)

        printf("90909\n");



    return 0;

}


// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <bits/stdc++.h>

using namespace std;



#define all(v)   v.begin(), v.end()

#define endl "\n";

#define pb push_back

#define F first

#define S second

#define JULEE_DO_THE_THING fast()

#define to_str to_string

#define isOdd(n)    (n&1)

#define LLMAX LLONG_MAX

#define LLMIN LLONG_MIN

#define IMIN INT_MIN

#define IMAX INT_MAX

#define pow POW



typedef long long ll;

typedef unsigned long long ull;

typedef long double ld;

typedef double dd;

typedef string str;

typedef vector<int> vecint;

typedef vector<ll> vecll;

typedef pair<int, int> pii;



void fast() {

	cin.tie(0);

	cout.tie(0);

	cin.sync_with_stdio(0);

}



bool compare(int &a, int &b) {

	return a > b;

}



ll numOfDigits(ll n) {

	if (!n)

		return 1;

	return (ll) (log10(n)) + 1;

}



ull POW(ll a, ll b);



/*



 */



ll BN();



int main() {

	JULEE_DO_THE_THING;

	//freopen("test cases\\.txt", "r", stdin) ;

    int n; cin>>n;

    ll ans= 0;

    for(int i=1; i<=n; i++){

        if(isOdd(numOfDigits(i)))ans++;

    }

    cout<<ans;

	return 0;

}



ll BN() {

	ll low = 0;

	ll up = 0;

	ll ans = 0;

	while (low <= up) {

		ll mid = ((low + up) / 2);

		if (mid) {

			ans = mid;

			low = mid + 1;

		} else

			up = mid - 1;

	}

	return ans;

}



ull POW(ll a, ll b) {

	ull res = 1;

	while (b > 0) {

		if (b & 1)

			res = res * a;

		a = a * a;

		b >>= 1;

	}

	return res;

}


// Optimized solution to the same problem (faster):
#include<stdio.h>



int main()

{

    int N, i, s=1, count=0;



    scanf("%d", &N);



    for(i=1; i<=N; i++){

        if(1*s <= i && i < 10*s){

            count++;

            if(i == (10*s-1))

                s *=100;

        }

    }



    printf("%d\n", count);



    return 0;

}


// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <bits/stdc++.h>-



using namespace std;



int main()

{

    int n;

    cin>>n;

    int m=n;

    int num_dig=0;

    while( m > 0 )

    {

        num_dig++;

        m/=10;

    }

    if( num_dig == 1 )

        cout<<n<<endl;

    else if( num_dig == 2 )

        cout<<9<<endl;

    else if( num_dig == 3 )

        cout<<9 + (n - 100 + 1)<<endl;

    else if( num_dig ==  4)

        cout<<9+900<<endl;

    else if( num_dig == 5 )

        cout<<9+900+(n-10000+1)<<endl;

    else if( num_dig ==  6)

        cout<<9+900+90000<<endl;

    return 0;

}


// Optimized solution to the same problem (faster):
#include<stdio.h>



int main()

{

    int N, i, s=1, count=0;



    scanf("%d", &N);



    for(i=1; i<=N; i++){

        if(1*s <= i && i < 10*s){

            count++;

            if(i == (10*s-1))

                s *=100;

        }

    }



    printf("%d\n", count);



    return 0;

}


// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <bits/stdc++.h>

using namespace std;



int digit(int n)

{

    int ret=0;

    while (n>0)

    {

        ret++;

        n/=10;

    }

    return ret;

}

int main()

{

    int n;

    cin>>n;

    int ans=0;

    for(int i=1; i<=n; i++)

    {

        if(digit(i)%2)

            ans ++;

    }

    cout<<ans<<endl;

    return 0;

}


// Optimized solution to the same problem (faster):
#include<stdio.h>



int main()

{

    int N, i, s=1, count=0;



    scanf("%d", &N);



    for(i=1; i<=N; i++){

        if(1*s <= i && i < 10*s){

            count++;

            if(i == (10*s-1))

                s *=100;

        }

    }



    printf("%d\n", count);



    return 0;

}


// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<bits/stdc++.h>

using namespace std;

#define LL long long int

#define DL double

#define MLL map<LL,LL>::iterator

#define MSL map<string,L>::iterator

#define MLS map<LL,string>::iterator

#define MSS map<string,string>::iterator

#define MCL map<char,LL>::iterator

#define SL set<LL>::iterator

#define SS set<string>::iterator

#define VL V<LL>::iterator

#define G getline

#define SZ size()

#define IN insert

#define C clear()

#define B begin()

#define F front()

#define T top()

#define E end()

#define EM emptm()

#define V vector

#define Q queue

#define DQ deque

#define PQ prioritm_queue

#define ST stack

#define FI first

#define MAn 1e18

#define MIN -1e18

#define SE second

#define PI acos(-1)

#define PS push

#define PP pop()

#define PSF push_front

#define PSB push_back

#define PPF pop_front()

#define PPB pop_back()

#define endl "\n"

#define FAST ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)

V<LL>v;

map<LL,LL>u;

void Y()

{

    cout<<"Yes"<<endl;

}

void N()

{

    cout<<"No"<<endl;

}

int main()

{

    FAST;

    LL n,m,i,j,k,p,q,o,l,s,t,z=0,r;

    string a,b,c;

    cin>>n;

    k=0;

    for(i=1;i<=n;i++)

    {

        if(i<10 || (i>99&&i<1000) ||(i>9999 && i<100000))

        {

            k++;

        }

    }

    cout<<k<<endl;

    return 0;

}


// Optimized solution to the same problem (faster):
#include<stdio.h>



int main()

{

    int N, i, s=1, count=0;



    scanf("%d", &N);



    for(i=1; i<=N; i++){

        if(1*s <= i && i < 10*s){

            count++;

            if(i == (10*s-1))

                s *=100;

        }

    }



    printf("%d\n", count);



    return 0;

}


// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<bits/stdc++.h>

using namespace std;

main()

{

    int n,k,l=0,i;

    string s;

    cin>>n;

    for(i=1;i<=n;i++)

    {

        s=to_string(i);

        k=s.size();

        if(k%2!=0)

            l++;

    }

    cout<<l<<endl;

    return 0;

}


// Optimized solution to the same problem (faster):
#include<stdio.h>



int main()

{

    int N, i, s=1, count=0;



    scanf("%d", &N);



    for(i=1; i<=N; i++){

        if(1*s <= i && i < 10*s){

            count++;

            if(i == (10*s-1))

                s *=100;

        }

    }



    printf("%d\n", count);



    return 0;

}


// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<iostream>

using namespace std;

int main ()

{

    long long int a;

    cin>>a;

    if(a<=9)

        cout<<a-0<<endl;

    else if(a<=99)

        cout<<9<<endl;

    else if(a<=999)

    {

        cout<<((a-100)+10)<<endl;

    }

    else if(a<=9999)

    {

        cout<<909<<endl;

    }

    else if(a<=99999)

    {

        cout<<((a-10000)+910)<<endl;

    }

    else if(a<=999999)

    {

        cout<<90909<<endl;

    }

}


// Optimized solution to the same problem (faster):
#include<stdio.h>



int main()

{

    int N, i, s=1, count=0;



    scanf("%d", &N);



    for(i=1; i<=N; i++){

        if(1*s <= i && i < 10*s){

            count++;

            if(i == (10*s-1))

                s *=100;

        }

    }



    printf("%d\n", count);



    return 0;

}


// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<bits/stdc++.h>

using namespace std;

int main()

{



long long a,b,c=0,d,e,g,h,i,j,k;

string arr;

cin>>a;

for(i=1;i<=a;i++)

{

arr=to_string(i);

if(arr.length()%2==1)

c++;



}

cout<<c;









}


// Optimized solution to the same problem (faster):
#include<stdio.h>



int main()

{

    int N, i, s=1, count=0;



    scanf("%d", &N);



    for(i=1; i<=N; i++){

        if(1*s <= i && i < 10*s){

            count++;

            if(i == (10*s-1))

                s *=100;

        }

    }



    printf("%d\n", count);



    return 0;

}


// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<bits/stdc++.h>

#define bye return 0

#define Yes cout << "Yes" << "\n"

#define No  cout << "No" << "\n"

#define YES cout << "YES" << "\n"

#define NO cout << "NO" << "\n"

using namespace std;

int main(){

	ios::sync_with_stdio(false);

    cin.tie(NULL);

    vector<int> v;

    set<int> s;

    int t, a, b, c, cnt=0;

    string str;

    cin >> t;



    for(int i=1; i<=t; ++i){

    	if(i>9 && i<100){

    		continue;

    	}else if(i>999 && i<10000){

    		continue;

    	}else if(i>99999 && i<=1000000){

    		continue;

    	}else{

    	cnt++;

    	}

    }



    cout << cnt << "\n";



    

    



   bye;



}

// Optimized solution to the same problem (faster):
#include<stdio.h>



int main()

{

    int N, i, s=1, count=0;



    scanf("%d", &N);



    for(i=1; i<=N; i++){

        if(1*s <= i && i < 10*s){

            count++;

            if(i == (10*s-1))

                s *=100;

        }

    }



    printf("%d\n", count);



    return 0;

}


// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<bits/stdc++.h>

#define ll long long int

#define pii <pair<ll,ll>>

using namespace std;



int digit(ll p)

{

    ll c=0;

    while(p>0)

    {

        c++;

        p=p/10;

    }

    return c;

}



void solve()

{

    ll n;

     cin >> n;

     ll ans=0;

     for(int i=1;i<=n;i++)

     {

         if(digit(i)%2!=0)

            ans++;

     }

     cout << ans << endl;

}



int main()

{

     solve();

     return 0;

}


// Optimized solution to the same problem (faster):
#include<stdio.h>



int main()

{

    int N, i, s=1, count=0;



    scanf("%d", &N);



    for(i=1; i<=N; i++){

        if(1*s <= i && i < 10*s){

            count++;

            if(i == (10*s-1))

                s *=100;

        }

    }



    printf("%d\n", count);



    return 0;

}


// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<iostream>

using namespace std;

int main()

{

  int n, tmp, c=0, ans;

  cin >> n;

  tmp = n;

  while(tmp)

  {

      tmp /= 10;

      c++;

  }

  if(c == 1)

    ans = n;

  else if(c == 2)

    ans = 9;

  else if(c == 3)

    ans = n-99+9;

  else if(c == 4)

    ans = 909;

  else if(c == 5)

    ans = n-9999+909;

  else if(c == 6)

    ans = 90909;

  

  cout << ans <<"\n";

  return 0;

}

// Optimized solution to the same problem (faster):
#include<stdio.h>



int main()

{

    int N, i, s=1, count=0;



    scanf("%d", &N);



    for(i=1; i<=N; i++){

        if(1*s <= i && i < 10*s){

            count++;

            if(i == (10*s-1))

                s *=100;

        }

    }



    printf("%d\n", count);



    return 0;

}


// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <bits/stdc++.h>

using namespace std;

void debug() {cout<<endl;}

template<typename T,typename... Args>

void debug(T x,Args... args) {cout<<x<<" ";debug(args...);}

#define forn(i,a,b) for(int i=a;i<b;++i)

#define SZ(x) int(x.size())

#define pb push_back

#define F first

#define S second

#define endl "\n"

typedef long long ll;

typedef pair<int, int> pii;



int main() {

    ios::sync_with_stdio(0); cin.tie(0);

    int n;

    cin >> n;

    int ans = 0;

    forn(i, 1, n+1) {

        string s = to_string(i);

        ans += SZ(s)&1;

    }

    cout << ans << endl;

}


// Optimized solution to the same problem (faster):
#include<stdio.h>



int main()

{

    int N, i, s=1, count=0;



    scanf("%d", &N);



    for(i=1; i<=N; i++){

        if(1*s <= i && i < 10*s){

            count++;

            if(i == (10*s-1))

                s *=100;

        }

    }



    printf("%d\n", count);



    return 0;

}


// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <bits/stdc++.h>

using namespace std;

typedef long long ll;

int main(){

	int n; cin>>n;

	int ans=0;

	for(int i=1; i<=n; i++){

		int aux = (log10(i)+1);

		if(aux%2!=0)

			ans++;

	}

	cout<<ans<<endl;

}


// Optimized solution to the same problem (faster):
#include<stdio.h>



int main()

{

    int N, i, s=1, count=0;



    scanf("%d", &N);



    for(i=1; i<=N; i++){

        if(1*s <= i && i < 10*s){

            count++;

            if(i == (10*s-1))

                s *=100;

        }

    }



    printf("%d\n", count);



    return 0;

}


// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<bits/stdc++.h>

using namespace std;



#define ll long long



const ll mod=1e9+7;

const int N = 2e5 + 20;



ll f[N];



ll pw(ll x, ll y){

	ll p = 1;

	while (y){

		if (y & 1){

			p = p * x % mod;

		}

		x = x * x % mod;

		y >>= 1;

	}

	return p;

}



ll C(ll n,ll k)

{

    ll a=f[n];

    ll b=(f[k]*f[n-k])%mod;

    return (a*pw(b,mod-2))%mod;

}



int main()

{

    f[0]=1;

    for(int i=1;i<N;i++)

    {

        f[i]=(i*f[i-1])%mod;

    }

    ll h,w,a,b;

    cin>>h>>w>>a>>b;



    ll ans=0;

    for(ll i=b+1;i<=w;i++)

    {

//        cout<<"B";

        ll tmp=(C(i-1+h-a-1,h-a-1)*C(w-i+a-1,w-i))%mod;

//        cout<<C(i-1+h-a-1,h-a-1)<<" "<<C(w-i+a-1,w-i)<<" ";

//        cout<<tmp<<endl;

//cout<<"A";

        ans=(ans+tmp) %mod;

    }

    cout<<ans%mod;

}


// Optimized solution to the same problem (faster):
#include<cstdio>



#define LL long long

#define MAXN 100000

#define MOD 1000000007

LL fac[2*MAXN+5];

LL inv[2*MAXN+5];



LL Pow(LL x,LL p){

    LL ret=1;

    while(p){

        if(p&1)

            ret=ret*x%MOD;

        x=(x*x)%MOD;

        p>>=1;

    }

    return ret;

}



void Prep(int N){

    fac[0]=1;

    for(int i=1;i<=N;i++)

        fac[i]=fac[i-1]*i%MOD;

    //inv[fac[i]]=Pow(fac[i],MOD-2)=Pow(1,MOD-2)...Pow(i,MOD-2)

    //inv[fac[i-1]]=Pow(fac[i-1],MOD-2)=Pow(1,MOD-2)...Pow(i-1,MOD-2)=Pow(fac[i],MOD-2)/Pow(i,MOD-2)=inv[i]*i

    inv[0]=1;

    inv[N]=Pow(fac[N],MOD-2);

    for(int i=N-1;i>=1;i--)

        inv[i]=inv[i+1]*(i+1)%MOD;

}



LL C(int m,int n){

    return fac[m]*inv[n]%MOD*inv[m-n]%MOD;

}



int main(){

    int H,W,A,B;

    scanf("%d%d%d%d",&H,&W,&A,&B);

    Prep(H+W);

    LL Ans=0;

    for(int i=B+1;i<=W;i++){

        LL tmp1=C(H-A+i-2,i-1);

        //C(m+n-x-y-2,m-x-1)

        //(H-A,i) -> (H,W)

        LL tmp2=C(A+W-i-1,A-1);

        Ans=(Ans+(tmp1*tmp2)%MOD)%MOD;

    }

    printf("%lld",Ans);

}


// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<cstdio>

#include<cstring>

#include<algorithm>

#define MO 1000000007

#define MAXN 200000

using namespace std;

int inv[MAXN+5],fact[MAXN+5];

int PowMod(int a,int b)

{

	int ret=1;

	a%=MO;

	while(b!=0)

	{

		if(b&1)

			ret=1LL*ret*a%MO;

		a=1LL*a*a%MO;

		b>>=1;

	}

	return ret;

}

void prepare()

{

	fact[0]=1;

	for(int i=1;i<=MAXN;i++)

		fact[i]=1LL*fact[i-1]*i%MO;

	inv[MAXN]=PowMod(fact[MAXN],MO-2);

	for(int i=MAXN-1;i>=0;i--)

		inv[i]=1LL*inv[i+1]*(i+1LL)%MO;

}

int C(int n,int m)

{

	return 1LL*fact[n]*inv[m]%MO*inv[n-m]%MO;

}

int main()

{

	prepare();

	int r,c,A,B;

	scanf("%d %d %d %d",&r,&c,&A,&B);

	int ans=0;

	int val;

	for(int i=0;i<=r-1-A;i++)

	{

		val=1LL*C(i+B-1,i)*C(r-i-1+c-B-1,r-i-1)%MO;

		ans=(1LL*ans+val)%MO;

	}

	printf("%d\n",ans);

	return 0;

}

// Optimized solution to the same problem (faster):
#include<cstdio>



#define LL long long

#define MAXN 100000

#define MOD 1000000007

LL fac[2*MAXN+5];

LL inv[2*MAXN+5];



LL Pow(LL x,LL p){

    LL ret=1;

    while(p){

        if(p&1)

            ret=ret*x%MOD;

        x=(x*x)%MOD;

        p>>=1;

    }

    return ret;

}



void Prep(int N){

    fac[0]=1;

    for(int i=1;i<=N;i++)

        fac[i]=fac[i-1]*i%MOD;

    //inv[fac[i]]=Pow(fac[i],MOD-2)=Pow(1,MOD-2)...Pow(i,MOD-2)

    //inv[fac[i-1]]=Pow(fac[i-1],MOD-2)=Pow(1,MOD-2)...Pow(i-1,MOD-2)=Pow(fac[i],MOD-2)/Pow(i,MOD-2)=inv[i]*i

    inv[0]=1;

    inv[N]=Pow(fac[N],MOD-2);

    for(int i=N-1;i>=1;i--)

        inv[i]=inv[i+1]*(i+1)%MOD;

}



LL C(int m,int n){

    return fac[m]*inv[n]%MOD*inv[m-n]%MOD;

}



int main(){

    int H,W,A,B;

    scanf("%d%d%d%d",&H,&W,&A,&B);

    Prep(H+W);

    LL Ans=0;

    for(int i=B+1;i<=W;i++){

        LL tmp1=C(H-A+i-2,i-1);

        //C(m+n-x-y-2,m-x-1)

        //(H-A,i) -> (H,W)

        LL tmp2=C(A+W-i-1,A-1);

        Ans=(Ans+(tmp1*tmp2)%MOD)%MOD;

    }

    printf("%lld",Ans);

}


// Fastest known solution for this problem: