package main import ( "bufio" "fmt" "os" "strconv" ) func main() { stdin := bufio.NewScanner(os.Stdin) stdin.Scan() num, err := strconv.Atoi(stdin.Text()) if err != nil { panic(err) } sum := 0 for i := 1; i <= num; i++ { sum += i } fmt.Println(sum) }