#include <bits/stdc++.h>
#define ll long long
#define vec vector
using namespace std;
 
const long long MAXVAL = (long long) 1e18 + 1;
const long long MOD = 1000000007ll;
//const long long MOD = 998244353ll;
const int INF = 1000000001;
 
long long poww(int x, long long pow) {
  if (pow == 0ll ) return 1;
  if (pow == 1ll) return x % MOD;
  long long ans = poww(x, pow >> 1) % MOD;
  ans = (ans * ans) % MOD;
  if ((pow & 1) == 1) {
    ans = (ans * x ) % MOD;
  }
  return ans % MOD;
}
 
ll gcd(ll x, ll y) {
  if (x == 0) return y;
  while (y) {
    x %= y;
    swap(x, y);
  }
  return x;
}
 
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int q = 1;
   //cin >> q;
  while (q-- >0) {
    int n;
    cin >> n;
    int k;
    cin >> k;
    int cc[n];
    for (int i = 0; i < n; ++i) cc[i]  = 0;
    for (int i = 0; i < n; ++i) {
      int x;
      cin >> x;
      cc[x]++;
    }
    int ans = 0;
    int j =0 ;
    while (cc[0] && j < k) {
      for (int i = 0 ;i < n; ++i) {
        if (cc[i] == 0) break;
        ++ans;
        --cc[i];
      }
      ++j;
    }
    cout << ans << "\n";

  }
}

 

#include <bits/stdc++.h>
using namespace std;

#define ll long long
#define ld long double
#define pb push_back
#define all(a) a.begin(),a.end()
#define MOD 1000000007
#define ff first
#define ss second
#define REP(i,a,n) for(ll i=a;i<n;i++)
#define REPR(i,n,a) for(ll i=n;i>a;i--)
#define sq(x) (x)*(x)
#define t_c(t) ll t;cin>>t;while(t--)
#define fast_io ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
// #define gcd(a,b) __gcd(a,b)
// #define lcm(a,b) (a*(b/gcd(a,b)))

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

ll gcd(ll a, ll b){
    if(b==0){
        return a;
    }
    return gcd(b,a%b);
}

ll lcm(ll a, ll b){
    return a*(b/gcd(a,b));
}

ll neg_mod(ll a, ll b){
    ll r=a%b;
    return r<0 ? r+b : r;
}

// const ll maxN=1000000;
// ll prime[maxN+1];

// void sieve(){
//     prime[0]=prime[1]=1;
//     for(ll i=2;i<=maxN;i++){
//         if(prime[i]==0){
//             for(ll j=i*i;j<=maxN;j+=i){
//                 prime[j]=1;
//             }
//         }
//     }
// }

void solve(){
    ll t,n;
    cin>>t>>n;
    ll dis=100+t;
    vector<ll> v(dis+1,0);
    for(ll i=1;i<=100;i++){
        ll curr=(ll)floor(((ld)t*(ld)i)/(ld)100);
        v[i+curr]=1;
    }
    vector<ll> nv;
    for(ll i=1;i<=dis;i++){
        if(v[i]==0){
            nv.pb(i);
        }
    }
    ll mul=((ll)ceil((ld)n/(ld)t))-1;
    ll mod=n%t;
    if(mod==0){
        mod=t;
    }
    ll ans=(mul*dis)+(nv[mod-1]);
    cout<<ans;
    // for(ll i=0;i<nv.size();i++){
    //     cout<<nv[i]<<" ";
    // }
}

int main(){
    fast_io;
    // init_code();
    // t_c(t){
    //     solve();
    // }
    solve();
    return 0;
}