
/**
 * Culture
 * Problem 1, AIC 2003
 * C Sample Solution
 */

#include <stdio.h>

int main() {
    FILE* in;
    FILE* out;
    int total, start, days;

    // Open the I/O files.
    in = fopen("cultin.txt", "r");
    out = fopen("cultout.txt", "w");

    // Read in the total number of bacteria.
    fscanf(in, "%d", &total);

    // Assume the experiment has been running for 0 days.
    start = total;
    days = 0;

    // While the initial number of bacteria is still even, halve this
    // initial number and add one day to the experiment.
    while (start % 2 == 0) {
        start = start / 2;
        days++;
    }

    // Now the initial number of bacteria is odd, so we must have our
    // solution.
    fprintf(out, "%d %d\n", start, days);

    // Tidy up.
    fclose(in);
    fclose(out);
    return 0;
}
