Problem:
Score : 200 points

Problem Statement

We have a long seat of width X centimeters.
There are many people who wants to sit here. A person sitting on the seat will always occupy an interval of length Y centimeters.

We would like to seat as many people as possible, but they are all very shy, and there must be a gap of length at least Z centimeters between two people, and between the end of the seat and a person.

At most how many people can sit on the seat?

Constraints

All input values are integers.

1 \leq X, Y, Z \leq 10^5

Y+2Z \leq X

Input

Input is given from Standard Input in the following format:

X Y Z

Output

Print the answer.

Sample Input 1

13 3 1

Sample Output 1

3

There is just enough room for three, as shown below:

Figure

Sample Input 2

12 3 1

Sample Output 2

2

Sample Input 3

100000 1 1

Sample Output 3

49999

Sample Input 4

64146 123 456

Sample Output 4

110

Sample Input 5

64145 123 456

Sample Output 5

109

Solution in C (GCC 9.2.1) (judge verdict: Accepted)

#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<stdbool.h>
#include<math.h>
#include<limits.h>
#define MAX 100004

typedef long long ll;

ll X,Y,Z;
ll max(ll a,ll b){
    if(a>b) return a;
    else return b;
}

ll min(ll a,ll b){
    if(a<b) return a;
    else return b;
}

/*qsort(array,num_of_index,sizeof(ll),compare_int); */
 ll compare_int(const void *a,const void *b){
     return *(ll*) a - *(ll *) b; 
 } 
 
ll b_search(ll* array,ll left,ll right,ll key){
    ll mid = left - (right - left)/2;
     if( right - left == 1){
         if(array[mid]==key)
             return mid;
          else
               return -1;
     }
     if(array[mid]==key)
         return mid;
     else if(array[mid]>key)
         b_search(array,left,mid,key);
     else if(array[mid]<key)
         b_search(array,mid,right,key);
}

ll check(ll ans){
    if(Y*ans + Z*(ans + 1) <= X) return 1;
    else return 0;
}

 ll upper_bound(ll  *array,ll left,ll right){
     if(right-left==1)
         return left;
     ll mid = left + (right - left)/2;
     if(check(mid))
         return upper_bound(array,mid,right);
     else
         return upper_bound(array,left,mid);
 }


ll main(){
    scanf("%lld %lld %lld",&X,&Y,&Z);
    ll num[MAX];
    for(ll i=1;i<MAX;i++)
        num[i] = i;
    printf("%lld",upper_bound(num,1,MAX));
}