class Main { public static void main(String[] args) { int n = 1; for(int i=9; i>0; i--) n = 2*n + 2; System.out.println("猴子共摘了"+n+"个桃子"); } }