public class Demonstrate {
 public static void main (String argv[]) {
  System.out.println (powerOf2 (4));
 }
 public static int powerOf2 (int n) {
  int counter, result = 1;       
  for (counter = n; counter-- != 0;) {
    result = 2 * result;
  }
  return result;
 }
}
