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 Haskell (GHC 7.10.3) (judge verdict: Accepted)

module Main where

import qualified Data.Vector as Vector
import Data.List as List
import Data.Vector.Unboxed as V
import qualified Data.ByteString.Char8 as BS
import Data.Maybe as Maybe

main :: IO ()
main =
    print =<< (\n -> (n - 2) * 180) <$> getInt

getInt :: IO Int
getInt = read <$> BS.unpack <$> BS.getLine

splitLine :: IO [BS.ByteString]
splitLine = BS.words <$> BS.getLine

getInts :: IO (V.Vector Int)
getInts = V.fromList <$> List.map fst <$> Maybe.mapMaybe BS.readInt <$> splitLine

solve :: V.Vector Int -> IO ()
solve v = print (if (v V.! 0 == 1) && (v V.! 1 == 1) then 1000000 else V.foldl (\a b -> a + (prize b)) 0 v)

prize :: Int -> Int
prize 1 = 300000
prize 2 = 200000
prize 3 = 100000
prize _ = 0