Problem:
Score : 600 points

Problem Statement

We have a sequence of length N consisting of non-negative integers. Consider performing the following operation on this sequence until the largest element in this sequence becomes N-1 or smaller.

Determine the largest element in the sequence (if there is more than one, choose one). Decrease the value of this element by N, and increase each of the other elements by 1.

It can be proved that the largest element in the sequence becomes N-1 or smaller after a finite number of operations.

You are given an integer K. Find an integer sequence a_i such that the number of times we will perform the above operation is exactly K. It can be shown that there is always such a sequence under the constraints on input and output in this problem.

Constraints

0 ≤ K ≤ 50 \times 10^{16}

Input

Input is given from Standard Input in the following format:

K

Output

Print a solution in the following format:

N
a_1 a_2 ... a_N

Here, 2 ≤ N ≤ 50 and 0 ≤ a_i ≤ 10^{16} + 1000 must hold.

Sample Input 1

0

Sample Output 1

4
3 3 3 3

Sample Input 2

1

Sample Output 2

3
1 0 3

Sample Input 3

2

Sample Output 3

2
2 2

The operation will be performed twice: [2, 2] -> [0, 3] -> [1, 1].

Sample Input 4

3

Sample Output 4

7
27 0 0 0 0 0 0

Sample Input 5

1234567894848

Sample Output 5

10
1000 193 256 777 0 1 1192 1234567891011 48 425

Solution in C++14 (GCC 5.4.1) (judge verdict: Accepted)

#include <bits/stdc++.h>

using namespace std;

#define pb push_back
#define mp make_pair
#define mt make_tuple
#define fi first
#define se second
#define all(a) (a).begin(),(a).end()
#define endl "\n"
#define rep(i, a, b) for (auto (i) = (a); (i) < (b); (i)++)
#define rrep(i, a, b) for (auto (i) = (a); (i) > (b); (i)--)

#define aim_cpo do{ios::sync_with_stdio(false);\
cin.tie(nullptr);cout.precision(12);cout<<fixed;}while(0)

#define LOCAL_INPUT do{FILE *stream1;\
stream1=freopen("/Users/aim_cpo/CLionProjects/competitive/in.txt","r",stdin);\
if(stream1==nullptr)return 0;}while(0)
#define LOCAL_OUTPUT do{FILE *stream2;\
stream2 = freopen("out.txt", "w", stdout);\
if (stream2 == nullptr) return 0;}while(0)

#ifdef LOCAL_DEFINE
#define show(x) cerr << #x << " = " << (x) << endl
#define dump(x) cerr << #x << " = " << (x) << " (line " << __LINE__ << ")" << endl
#define showV(v, n) do{\
for(int _i_t_e_=0; _i_t_e_<(n);_i_t_e_++)\
cerr<<"("<<_i_t_e_<<" = "<<(v)[_i_t_e_]<<") ";\
cerr<<endl;}while(0)
#define showA(a, n) do{\
for(int _i_t_e_=0;_i_t_e_<(n);_i_t_e_++)\
cerr<<"("<<_i_t_e_<<" = "<<(a)[_i_t_e_]<<") ";\
cerr<<endl;}while(0)
#define showA2(a, n, m) do{\
for(int _i_t_e_=0;_i_t_e_<(n);_i_t_e_++){\
for(int _i_t_e_2=0;_i_t_e_2<(m);_i_t_e_2++){\
cerr<<"("<<_i_t_e_<<", "<<_i_t_e_2<<" = "<<(a)[_i_t_e_][_i_t_e_2]<<") ";\
}cerr<<endl;}cerr<<endl;}while(0)
#else
#define show(x)
#define dump(x)
#define showV(v, n)
#define showA(a, n)
#define showA2(a, n, m)
#endif

typedef long long ll;
typedef unsigned long long ull;

constexpr const int INT_INF=0x3f3f3f3f; //1061109567
constexpr const ll LL_INF=0x3f3f3f3f3f3f3f3f; //4557430888798830399

template <typename T> bool chmin(T &a, T b){return a>b?(a=b,true):false;}
template <typename T> bool chmax(T &a, T b){return a<b?(a=b,true):false;}
template <typename T> void ln(T i, T n){cout<<(i==n-1?"\n":" ");}
template <typename T, typename S>
ostream &operator<<(ostream &out,const pair<T, S> &pair1){
  out<<'('<<pair1.fi<<", "<<pair1.se<<')';return out;}
template <typename T>
ostream &operator<<(ostream &out,const vector<T> &vector1){
  out<<'[';for(unsigned int i=0;i<vector1.size();i++){
    out<<vector1[i];if(i==vector1.size()-1)out<<"]";else out<<", ";
  }return out;
}

// INT
#define GCD(a, b) __gcd(a, b)
template <typename T> T LCM(T a, T b) {return a / GCD(a, b) * b;}
template <typename T> T EXTGCD(T a, T b, T& x, T& y) {
  T d = a;
  if (b != 0) {d=EXTGCD(b,a%b,y,x);y-=(a/b)*x;}
  else x=1,y=0;
  return d;
}
template <typename T> bool is_prime(T a) {
  for(int i=2;i*i<=a;i++)if(a%i==0)return 1;
  return 0;
}
template <typename T, typename S> T Pow(T a, S b) {
  T res = 1, now = a;
  while(b){if(b&1)res*=now;b>>=1;now*=now;}return res;
}

// MOD
ll MOD = 1000000000L + 7L;
#define add(a, b) ((a % MOD) + (b % MOD)) % MOD
#define mul(a, b) ((a % MOD) * (b % MOD)) % MOD
#define sub(a, b) ((a % MOD) + MOD - (b % MOD)) % MOD
template <typename T, typename S> T ModPow(T a, S b) {
  T res = 1, now = a;
  while(b){if(b&1)res=mul(res,now);b>>=1;now=mul(now,now);}return res;
}
template <typename T> T mod_inverse(T a, T mod, bool prime){ // if mod is prime, "prime" is true.
  if(prime)return ModPow(a, mod - 2);
  else{T x,y;EXTGCD(a,mod,x,y);return (mod+x%mod)%mod;}
}
#define divide(a, b) ((a % MOD) * (mod_inverse(b, MOD, true))) % MOD

//LLの数値をつかう時は最後にLをつける癖をつけよう
//
//  ┏┓┏┓　┓　┏┓
//  ┏┛┃┃　┃　┗┫
//  ┗┛┗┛　┻　┗┛
//
//   謹┃賀┃新┃年┃
//   ━┛━┛━┛━┛
//WWWWWWWWWWWWWWWWWWWWWW

ll k;
ll a[51];

int main() {
  aim_cpo; // インタラクティブのときは消すように.
#ifdef LOCAL_DEFINE
  LOCAL_INPUT; // インタラクティブのときは消すように.
//  LOCAL_OUTPUT; // ファイルに出力したいときのみ
  show(MOD);
#endif
  // テキトー考察
  //
  // n = 50と固定する
  // a[0] = x, a[1] = x - 1, a[2] = x - 2, ... a[49] = x - 49
  // みたいに数字を入れると、50回操作したら
  // a[0] = x - 1, a[1] = x - 2, a[2] = x - 3, ... a[49] = x - 50
  // みたいに丁度元の数列から1ずつ引いた数列になる.
  // この考えを利用して、k回操作したらa[0] = 49, a[1] = 48, a[2] = 47, ... a[49] = 0となるような数列を求める
  // k - k % 50 回操作して、a[0] = 49, a[1] = 48, a[2] = 47, ... a[49] = 0とするには
  // a[0] = 49 + k / 50, a[1] = 49 + k / 50 - 1, ... a[49] = k / 50という数列であればいい.この数列をbとする.
  // 残りのk % 50回の操作でbに操作の逆(最小値に50を足して、それ以外から1引く)をやれば丁度k回の操作で目標の数列になるような
  // 数列が完成する.(わーい)
  //
  // なんで50に固定するんや...なんでa[0] = x, a[1] = x - 1, a[2] = x - 2,...みたいな数列にしようと思ったんや...
  // って思う人も多いよね...個人的には思いついたからこうしただけ以外に明確な理由みたいなものはないなあ
  // これが構築の嫌われる理由とも言える、「思いつくかつかないか」要素だよね...気持わかるわ...
  // 強い人とかは構築ってどんなふうに考えてるんやろね...
  // まあ、でも構築もある程度慣れなのかなあ...
  // まあ思いつかなかったらあきらめて問題と解法ごと丸暗記するのも手段のひとつなのかな.
  // ただ、今回みたいにNを好きに決めて出力するときはNをある数字に固定して考察するみたいな問題は結構ある気がするわ.
  // 自由度の高い問題をできるだけシンブルに考えようとするとまあ納得の行く手段かもね.
  // まあ、あとは自分の脳に全て任せるわ.
  cin >> k;
  ll x = 49LL + k / 50LL + 1;
  rep(i, 0LL, 50LL) a[i] = x - i;
  rep(i, 0, 50LL - k % 50LL) {
    int idx = -1;
    ll _max = -1LL;
    rep(j, 0, 50) {
      if (chmax(_max, a[j])) idx = j;
    }
    a[idx] -= 50LL;
    rep(j, 0, 50) {
      if (j == idx) continue;
      a[j] += 1LL;
    }
  }
  cout << 50 << endl;
  rep(i, 0, 50) {
    cout << a[i];
    ln(i, 50);
  }
#ifdef  LOCAL_DEFINE
  cerr << "Time elapsed: " << 1.0 * clock() / CLOCKS_PER_SEC << "s." << endl;
#endif
  return 0;
}