import java.util.*;
public class ErrorChecking{
  
  
  public static void main(String[] args) { 
    
    Scanner keybd = new Scanner(System.in);
    
    System.out.print("Enter a positive number: ");
    double number = keybd.nextDouble();
    
    if(number<=0) {
      System.err.println("Error. "+number+ " is not positive.");
      System.exit(1);
    }
    
    double result = 1/Math.sqrt(number);
    
    System.out.println(result);
    
    
  }
  
  
  
}
