public class M416Damage {
  
  private static final double THIGH_DAMAGE_RATIO = 20; 
  
  public static void main(String[] args) {
    int numShots = 5; 
    int targetDefense = 100; 
    
    double maxThighDamage = calculateMaxThighDamage(targetDefense);
    double totalThighDamage = calculateTotalThighDamage(maxThighDamage, numShots);
    
    System.out.println("Max Thigh Hit Damage for M416：" + maxThighDamage);
    System.out.println(numShots + "5The sum of thigh hit damage in each shot.：" + totalThighDamage);
  }
  
  private static double calculateMaxThighDamage(int targetDefense) {

    double maxTotalDamage = 200; 
    double maxThighDamage = maxTotalDamage * THIGH_DAMAGE_RATIO;
    

    maxThighDamage -= targetDefense;
    
    if (maxThighDamage < 0) {
      maxThighDamage = 0; 
    }
    
    return maxThighDamage;
  }
  
  private static double calculateTotalThighDamage(double maxThighDamage, int numShots) {
    return maxThighDamage * numShots;
  }
  
}
`