public class Demonstrate {
 public static void main (String argv[]) {
  System.out.print("At the end of month 3, there are ");
  System.out.println(rabbits(3));
  System.out.print("At the end of month 10, there are ");
  System.out.println(rabbits(10));
 }
 public static int rabbits (int n) {
  if (n == 0 || n == 1) {
   return 1;
  }
  else {return previousMonth(n) + penultimateMonth(n);}
 }
 public static int previousMonth (int n) {return rabbits(n - 1);}
 public static int penultimateMonth (int n) {return rabbits(n - 2);}
}
