package main import ( "bufio" "fmt" "os" "strconv" ) func stdin() (inputs []string) { scanner := bufio.NewScanner(os.Stdin) for scanner.Scan() { inputs = append(inputs, scanner.Text()) } return } // Run is a main process func Run(inputs []string) string { num, _ := strconv.Atoi(inputs[0]) sum := 0 for i := 1; i <= num; i++ { sum += i } return fmt.Sprint(sum) } func main() { p := stdin() fmt.Println(Run(p)) }