#include <iostream>
#include <cmath>
using namespace std;
int main()
{
long long int n;
double x = log(n)/log(2);
int y = x;
while (cin >> n) if (n) cout << n << ". " << y << endl;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8Y21hdGg+Cgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKaW50IG1haW4oKSAKewogICAgbG9uZyBsb25nIGludCBuOwogICAgZG91YmxlIHggPSBsb2cobikvbG9nKDIpOwogICAgaW50IHkgPSB4OwogICAgd2hpbGUgKGNpbiA+PiBuKSBpZiAobikgY291dCA8PCBuIDw8ICIuICIgPDwgeSA8PCBlbmRsOwogICAgICAgIAogICAgCiAgICAKICAgIAogICAgCgkKCQoJCglyZXR1cm4gMDsKfQ==