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

int main() {
	ll K;cin >> K;
	ll x = K / 50;
	ll y = K % 50;
	vector<ll> ans;
	cout << 50 << endl;
	for (int i = 0;i < 51;i++) {
		if (i + y != 50)
			ans.push_back(i);
	}
	for (int i = 0;i < 50;i++) {
		cout << ans[i] + x << " ";
	}
}
#include "bits/stdc++.h"
#include "ext/pb_ds/tree_policy.hpp"
#include "ext/pb_ds/assoc_container.hpp"
using namespace std;
////////////// Prewritten code follows. Look down for solution. ////////////////
#define x first
#define y second
#define LEN(x) ((int)(x).size())
#define ALL(x) x.begin(), x.end()
using ll = long long;
using llu = long long unsigned;
using ld = long double;
using pii = pair<int, int>;
using vi = vector<int>;
using vpii = vector<pii>;

const ld EPS = 1e-9;
inline int cmp(ld x, ld y = 0, ld tol = EPS) {
	return (x <= y + tol) ? (x + tol < y) ? -1 : 0 : 1;
}

const int MOD = 1;
inline int mod(ll x, int m = MOD) {
	return (int)(((x%m) + m)%m);
}

template<typename T, typename M = __gnu_pbds::null_type>
using ordered_set = __gnu_pbds::tree<T, M, less<T>, __gnu_pbds::rb_tree_tag, __gnu_pbds::tree_order_statistics_node_update>;

////////////////////////// Solution starts below. //////////////////////////////

vector<string> vec = {"SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"};

int main () {
	ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.precision(10);
	string s;
	cin >> s;
	int ans = 0;
	int p = 0;
	while(vec[p] != s) ++p;
	while(vec[p] != "SUN") {
		p = (p+1)%7;
		++ans;
	}

	if(!ans) ans += 7;
	cout << ans << '\n';

	return 0;
}
