Can you help me in altering my formula so that the result don't extend after 5
import java.util.Scanner; public class Program { public static void main(String[] args) { int a,b,c,d,e,n; float f; Scanner scan=new Scanner(System.in); a=scan.nextInt(); System.out.println("5 rate :" +a); b=scan.nextInt(); System.out.println("4 rate :" +b); c=scan.nextInt(); System.out.println("3 rate :" +c); d=scan.nextInt(); System.out.println("2 rate :" +d); e=scan.nextInt(); System.out.println("1 rate :" +e); f=scan.nextInt(); System.out.println("total :" +f); n=scan.nextInt(); System.out.println("full:" +n); System.out.println("end:" +(5+(a+(n-(f+a)))+4*b+3*c+2*d+1*e)/f); } }