import java.util.Scanner;

public class NestedConditional {
	
	public static void main(String[] args) {
		String animal;
		int numberOwned;
		
		Scanner sc = new Scanner(System.in);
		
		System.out.print("What is your favorite animal? ");
		animal = sc.next();
		
		System.out.print("How many " + animal + "s do you own? ");
		numberOwned = sc.nextInt();

		if (numberOwned < 0) {
			System.out.println(
					"How can you own a negative number of " +
					animal +
					"s?");
		}
		else if (numberOwned == 0) {
			System.out.println("That's a shame :(");
		}
		else if ( (
			    	animal.equals("dog") || 
			    	animal.equals("cat") || 
			    	animal.equals("hamster")
			      ) &&
			      	numberOwned < 4
			    ) {
			System.out.println("You are a typical " +  animal + " owner.");
		} 
		else {
			System.out.println("That's unusual!");
		}
	}
}

//Copyright 2010-2012 : Evan Golub 

