package main import ( "bufio" "os" "strconv" "sort" "fmt" ) var s = bufio.NewScanner(os.Stdin) func next() string { s.Scan() return s.Text() } func nextInt() int { i, e := strconv.Atoi(next()) if e != nil { panic(e) } return i } func nextLong() int64 { i, e := strconv.ParseInt(next(), 10, 64) if e != nil { panic(e) } return i } func main() { s.Split(bufio.ScanWords) list := []int{nextInt(), nextInt(), nextInt()} sort.Ints(list) count := list[0] for i, _ := range list { list[i]-=count } for list[1] >= 1 && list[2] >= 3 { count+=1 list[1]-=1 list[2]-=3 sort.Ints(list) } var a = list[1] / 5 count+= a list[1]-=a var b = list[2] / 5 count+= b list[2]-=b fmt.Println(count) }