#include <bitset>
#include <stdexcept>
#include <cassert>
#include <utility>
#include <iostream>

constexpr int MAX_N = 10000;

std::bitset<MAX_N> valid_mask, possible_positions;
int n, questions_asked = 0;

bool query(int where){
	questions_asked++;	
	if(where < 0 || where >= n) return false;
	possible_positions.reset(where);
    auto shifted_left = possible_positions << 1;
    auto shifted_right = possible_positions >> 1;
    possible_positions = std::move((shifted_left | shifted_right) & valid_mask);
    return possible_positions.count() == 0;
}

void solve(int n){
	///aici implementati voi. 
}

int main() {
	
    int num_boxes; std::cin >> num_boxes;
    n = num_boxes;
	
	for (int i = 0; i < n; ++i) {
        possible_positions.set(i);
        valid_mask.set(i);
    }
	
	solve(n);
	std::cout << questions_asked << " " << possible_positions.count() << std::endl;
	
	bool showPositions = true;
	if(showPositions){
		for(int i = 0; i < n ; i++){
			if(possible_positions[i])
				std::cout << i << " ";
		}
		
		std::cout << std::endl;
	}
	
    return 0;
}

/*exemplu de submisie

#include "bombs.h"

int variabilaFolositoare = 10;

void solve(int n){
	for(int i = 0; i < variabilaFolositoare)
		query(i);
}

*/