#include <bits/stdc++.h>
using namespace std;
string itosm(long long x) {
  if (x == 0) return "0";
  string ans = "";
  while (x > 0) {
    ans += ((x % 10) + '0');
    x /= 10;
  }
  reverse(ans.begin(), ans.end());
  return ans;
}
long long stoim(string str) {
  long long ans = 0;
  long long k = 1;
  for (int i = str.length() - 1; i >= 0; i--) {
    ans += (str[i] - '0') * k;
    k *= 10;
  }
  return ans;
}
const long long infll = 1e18 + 3;
const int inf = 1009000999;
const double eps = 1e-7;
const int maxn = 1e6 + 777;
const int baseint = 1000200013;
const long long basell = 1e18 + 3;
const long double PI = acos(-1.0);
const long long mod = 1e9 + 7;
long long dp[maxn];
void solve() {
  vector<int> v;
  int a;
  cin >> a;
  dp[0] = 1;
  for (int i = 0; i < 10; i++) {
    int x = 1 << i;
    for (int j = 0; j < maxn; j++) {
      dp[j + x] += dp[j];
    }
    v.push_back(x);
    for (int j = 1; j < maxn; j++) {
      if (dp[j] == a) {
        cout << j << " " << v.size() << "\n";
        for (int xx : v) cout << xx << " ";
        return;
      }
    }
  }
  exit(228);
}
int main() {
  srand(time(0));
  ios_base::sync_with_stdio(0);
  ;
  solve();
  return 0;
}
