import java.util.*
 
fun main(args: Array<String>){
  
  val(a,b,c,d,e) = readLine()!!.split(" ").map{it.toInt()}
 
  when(a+b+c+d+e){
    14 -> print("1")
    
    13 -> print("2")
    
    12 -> print("3")
    
    11 -> print("4")
    
    10 -> print("5")
    
    else -> print("error")
  }
  
}