import javax.swing.*;

public class Average3Gui
{
	public static void main(String[] args)
	{
		String input;
		input = JOptionPane.showInputDialog("Enter an integer:");
		int num1  = Integer.parseInt(input);

		input = JOptionPane.showInputDialog("Enter an integer:");
		int num2 = Integer.parseInt(input);

		double average = (num1 + num2)/2;

		JOptionPane.showMessageDialog(
			null, "The average is " + average);

		System.exit(0);
	}
}