import static java.lang.System.err;


public class Sandbox {

	private static void quickExit() {
		err.println("Now exiting...");
		System.exit(1);
	}
	
	public static void main(String[] args) {
		int os = -1;
		int arch = -1;
		String bufferOS = System.getProperty("os.name");
		
		// Determine Host OS
			// Undeterminable
			if (bufferOS == null) {
				err.println("Error: Unable to determine host operating system");
				quickExit();
			
			} else
			// Linux
			if (bufferOS.indexOf("Linux")!=-1) {
				os = 0;
				// Arch
				String bufferArch = System.getProperty("os.arch");
				if (bufferArch.indexOf("ppc")!=-1) {
					arch = 2;
				} else if (bufferArch.indexOf("ppc")!=-1) {
					arch = 1;
				} else if (bufferArch.indexOf("ppc")!=-1) {
					arch = 0;
				} else {
					arch = 0; // Hope this works, not sure though
				}
				
				
			} else if (bufferOS.indexOf("Windows")!=-1) {
				os = 1;
			} else if (bufferOS.indexOf("Mac OS X")!=-1) {
				os = 2;
			} else {
				err.println("Error: Operating system not supported.");
				quickExit();
			}
		System.out.println(os);
		

	}

}
