Problem:
Score : 100 points

Problem Statement

Given an integer N not less than 3, find the sum of the interior angles of a regular polygon with N sides.

Print the answer in degrees, but do not print units.

Constraints

3 \leq N \leq 100

Input

Input is given from Standard Input in the following format:

N

Output

Print an integer representing the sum of the interior angles of a regular polygon with N sides.

Sample Input 1

3

Sample Output 1

180

The sum of the interior angles of a regular triangle is 180 degrees.

Sample Input 2

100

Sample Output 2

17640

Solution in Java8 (OpenJDK 1.8.0) (judge verdict: Runtime Error)

import java.util.*;



public class Main{

    public static void main(String[] args){

        Scanner in =new Scanner(System.in);
        int n=in.nextInt();
        int a=in.nextInt();
        int b=in.nextInt();
        int c=in.nextInt();

        double exvalue=0;
       
        int ncr;
        for(int x=0;x<30;x++){

            ncr = (factorial(n) / (factorial(n - x) * factorial(n)));
            exvalue=exvalue+( (n+x)*ncr*Math.pow(c, x)*(Math.pow(a, n)+Math.pow(b, n)) )/(Math.pow(100, n+x));
        }
        int sol=(int) Math.round(exvalue);
        System.out.print(sol/(Math.pow(10,9)+7));
        
    }


public static int factorial(int n){
    //1
    int fact = 1;
    //2
    for (int i = 1; i <= n; i++) {
        //3
        fact = fact * i;
    }
    //4
    return fact;
}
}