#define _USE_MATH_DEFINES
//#include <bits/stdc++.h>
# include <iostream>
# include <array>
# include <string>
# include <vector>
# include <algorithm>
# include <functional>
# include <cmath>
# include <iomanip>
# include <stack>
# include <queue>
# include <numeric>
# include <map>
# include <set>
# include <unordered_map>
# include <unordered_set>
# include <chrono>
# include <random>
# include <bitset>
# include <cassert>
# include <climits>

template<typename T> inline bool chmax(T &a, T b) { return ((a < b) ? (a = b, true) : (false)); }
template<typename T> inline bool chmin(T &a, T b) { return ((a > b) ? (a = b, true) : (false)); }

#define rep2(i,t,n) for (int i = (t); i < (int)(n); i++)
#define rep(i,n) rep2(i,0,n)
#define YESNO(T) if(T){cout<<"YES"<<endl;}else{cout<<"NO"<<endl;}
#define yesno(T) if(T){cout<<"yes"<<endl;}else{cout<<"no"<<endl;}
#define YesNo(T) if(T){cout<<"Yes"<<endl;}else{cout<<"No"<<endl;}

using namespace std;
typedef long long ll;

int t;
ll n;

int main() {
  cin >> t >> n;
  
  double cand = ((long double)n * 100 / t) + n;
  ll candL = (ll)cand;

  ll ans = candL;

  if(abs(cand - (long double)candL) < 0.000001L) {
    ans--;
  }

  cout << ans << endl;
  //printf("%10f", cand);


  return 0;
}

#ifdef _DEBUG
#define _GLIBCXX_DEBUG
#endif
#if __has_include(<atcoder/all>)
#include <atcoder/all>
#endif
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using P = pair<int, int>;
#define rep(i, a, b) for(int i = (int)(a); i <= (int)(b); i++)
#define rrep(i, a, b) for(int i = (int)(a); i >= (int)(b); i--)
const int MOD = 1000000007;
const int MOD2 = 998244353;
const ll INF = 1e18;
const ld PI = acos(-1);

int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    int N;
    cin >> N;
    string S;
    cin >> S;
    vector<int> A(N+1);
    rep(i,0,N){
        cin >> A[i];
    }
    int diff=1e9;
    rep(i,0,N-1){
        diff=min(diff,abs(A[i]-A[i+1]));
    }
    cout << diff << endl;
    rep(i,0,diff-1){
        rep(j,0,N){
            cout << A[j]/diff << (j==N?'\n':' ');
            A[j]++;
        }
    }
}