import java.io.*; public class findband { static int p = 14; public static void main(String[] args) throws IOException { BufferedReader reader = new BufferedReader( new InputStreamReader(System.in)); int d; int diff; double band=0; System.out.println("2 e N = " + p); while ( true ) { System.out.print("\nDelta = "); d = Integer.parseInt(reader.readLine()); diff = p - d + 1; if ( diff == 1 ) { System.out.println("band = 0"); } else { band = Math.log(diff)/Math.log(2); System.out.print("band = " + band); System.out.println(" int band = " + (int)band); } } } }