#pragma GCC optimize("Ofast")
#include<bits/stdc++.h>
using namespace std;
 
#define ll 				long long
#define eb 				emplace_back
#define mp              make_pair
#define pb              push_back
#define watch(x) 		cout << (#x) << " = " << (x) << endl;
#define w(x)			int x; cin >> x; while(x--)
#define all(x)          (x.begin(), x.end())
#define fastIO          ios_base::sync_with_stdio(false); cin.tie(nullptr);
#define vi              vector<int>
#define lcm(x, y)       (x/__gcd(x, y))*y
#define sayHi           cout << "Say Hi!!!!!!!!!!!!!!!!!!!!!!!!!\n";
#define rep(i,k,n)      for(int i=k; i<n; i++)
#define REPR(i,k,n) 	for (int (i) = (k); (i) >= (n); (i)--)
#define sumAll(a)       (accumulate ((a).begin(), (a).end(), 0ll))
#define mine(a)         (*min_element((a).begin(), (a).end()))
#define maxe(a)         (*max_element((a).begin(), (a).end()))
#define mini(a)         (min_element((a).begin(), (a).end()) - (a).begin())
#define maxi(a)         (max_element((a).begin(), (a).end()) - (a).begin())
#define lowb(a, x)      (lower_bound((a).begin(), (a).end(), (x)) - (a).begin())
#define uppb(a, x)      (upper_bound((a).begin(), (a).end(), (x)) - (a).begin())
#define mem0(a)         (memset(a, 0, sizeof(a)))
#define mem1(a)         (memset(a, -1, sizeof(a)))
const int MAXN = (int)((1e5) + 100);
const long long MOD = 1e9 + 7;
bool isPrime(ll n){if(n<2)return false;for(ll i=2;i*i<=n; i++){if(n%i==0)return false;}return true;}
int countDigit(ll n){int count=0;while(n!=0){n/=10;++count;}return count;}
void removeCharFromString(string &str,const char &ch){str.erase(remove(str.begin(),str.end(),ch),str.end());}
void showTime() {cerr<<"\nExecution time: "<<(float)clock()/CLOCKS_PER_SEC<<" secs\n";}
long long binExp(long long base,long long pow){
    long long result=1;
    while(pow){
        if(pow%2){result*=base;}
        base*=base;
        pow/=2;
    }
    return result;
}
long long binExpMod(long long base,long long pow,long long M){
    long long result=1;
    while(pow){
        if(pow%2){result=(result*base)%M;}
        base=(base*base)%M;
        pow/=2;
    }
    return result;
}
bool sortBySecAsc(const pair<ll,ll> &a, const pair<ll,ll> &b){
    return (a.second < b.second);
}
bool sortBySecDes(const pair<ll,ll> &a, const pair<ll,ll> &b){
    return (a.second > b.second);
}
/*#ifndef ONLINE_JUDGE
    freopen("input.txt","r",stdin);
    freopen("output.txt","w",stdout);
#endif*/

/*-----------------------------------------------------------------------------------------------------------------*/

int main() {
    fastIO
    
    map<int, string> m;
    w(t) {
        int x;
        string s;
        cin >> s >> x;
        m[x] = s;
    }
    // for(auto i:m) {
    //     cout << i.first << " " << i.second << "\n";
    // }
    auto it = m.end();
    it--; it--;
    cout << it->second; 
    
    return 0;
}

#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>

#define ll                      long long
#define int                     ll
#define FIO                     ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define ld                      long double
#define ull                     unsigned long long
#define endl                    "\n"
#define fo(i,a,b)               for(int i = a; i<=b ; i++)
#define rfo(i,a,b)              for(int i = a; i>=b ; i--)
#define vii                     vector<int>
#define vll                     vector<ll>
#define pq                      priority_queue
#define uom                     unordered_map
#define all(v)                  v.begin(),v.end()
#define mp                      make_pair
#define pb                      push_back
#define pob                     pop_back
#define ff                      first
#define ss                      second
#define pii                     pair<int,int>
#define mii                     map<int,int>
#define vvii                    vector<vii>
#define mod                     1000000007
#define MIN                     -1e9
#define pi                      3.1415926535897932384626433832795

using namespace std;
using namespace __gnu_pbds;

template<class T> using oset =  tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;


void INPUT()
{
#ifndef ONLINE_JUDGE
  freopen("input.txt", "r", stdin);
  freopen("output.txt", "w", stdout);
#endif
}

/*
----------------------------------------------------------------

   -> Check For Overflows
   -> Out of Bounds
   -> Initialisations of global arrays and variables
   -> Read the Question and the sample test cases carefully
   -> Its not Always Complex, Try to simplify
   -> write it down and try to solve
   -> Have Faith in urself and in ur approach
   -> If it seems totally out of reach, switch to next :)
   -> And Come Back later, if possible ..

----------------------------------------------------------------*/
bool cmp(pair<int, int>& a, 
         pair<int, int>& b) 
{ 
    return a.ff < b.ff; 
} 
void solve()
{

  int n,w;
  cin >> n>>w;
  // int a[n];
  // fo(i,0,n-1)
  // cin>>a[i];
  //sort(a,a+n);
  cout<<n/w<<endl;
}
signed main() {

  FIO
  INPUT();

  int t;
  t = 1;
  // cin >> t;

  fo(i, 0, t - 1)
  {
    solve();
  }

  return 0;
}