#include <iostream>
#include <vector>
using namespace std;
typedef long long ll;

int main(){
  ll t, N;
  cin >> t >> N;
  ll p = 100 + t;
  vector<bool> vec_ori(p,true);
  for(int i=0 ; i<100 ; ++i){
    vec_ori[p*i/100] = false;
  }

  vector<ll> vec;
  for(int i=0 ; i<p ; ++i){
    if(vec_ori[i]){
      vec.push_back(i);
    }
  }

  ll q = (N-1)/t;
  ll r = (N-1)%t;
  cout << p*q + vec[r] << endl;

  return 0;
}
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ld long double
#define F first
#define S second
#define Tsetso ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define pr pair < int , int >
const int N = 3e6+10,NN = 1005, length = 25 , mod = 1e9+7;

ll dp[4][N];
int main() {
    Tsetso
    ll n ,k  ;
    cin >> n >> k ;
    dp[0][0] = 1;
    for ( int i = 0 ; i < 3 ; i++) {
        for (int j = 0; j <= i * n; j++) {
            dp[i + 1][j + 1] += dp[i][j];
            dp[i + 1][j + n + 1] -= dp[i][j];
        }
        for ( int j = 1 ; j <= (i+1) * n ; j++)
                dp[i+1][j] += dp[i+1][j-1];
    }
    int sum ;
    for ( int i = 3 ; i <= 3 * n ; i++)
    {
        if ( k <= dp[3][i])
        {
            sum = i ;
            break;
        }
        k -= dp[3][i];
    }
    int x = 0;
    for ( int i = max(1LL,sum - (2 * n)); i <= n ; i++)
    {
        if ( sum - i < 2)
                break;
        if (k <= dp[2][sum-i]) {
            x = i;
            break;
        }
        k -= dp[2][sum-i];
    }
    sum -= x ;
    int y = max(1LL,sum -n) , z = sum - y;
    y += k-1;
    z -= k-1;
    cout << x << ' ' << y << ' ' << z ;
}