import java.util.Arrays; import java.util.Scanner; import java.util.stream.IntStream; public class x { public static void main(String[] args) { int[] xs = IntStream.iterate( new Scanner(System.in).nextInt(), p -> p % 2 == 0 ? p / 2 : 3 * p + 1 ) .limit(400L) .toArray(); int index = 0; for (int x : xs) { if (x == 1) break; index++; } System.out.println(index); System.out.println(Arrays.stream(xs).max().getAsInt()); } }