import java.util.Scanner;

public class ObsahTrojuhelniku {

	// Staticka metoda pro nacteni Doubleu //
	public static double nactiDouble(String text) {
	    Scanner sc = new Scanner(System.in);
		System.out.print(text + ": ");
		double x = sc.nextInt();
		return x;
	}		
	
	
	public static void main(String[] args) {
		// Zadani delek stran trojuhelnika
		double a=nactiDouble("Zadej delku strany a (v cm)");
		double b=nactiDouble("Zadej delku strany b (v cm)");
		double c=nactiDouble("Zadej delku strany c (v cm)");

		// Podminka sestrojitelnosti trouhelniku
        if ((a + b > c) && (a + c >b) && (b + c > a)){
            double s = ((a + b + c)/2);
            double plocha = Math.pow((s*(s-a)*(s-b)*(s-c)),1/2.0);
            System.out.println("Obsah trojuhelnika je " + plocha + " cm2");
        }	
        else
        {
        	System.out.println("Trojuhelnik nelze sestrojit");
        }
	}
}
