https://www.acmicpc.net/problem/2475
import java.util.*;
fun main(args: Array<String>) {
val s=Scanner(System.`in`)
var a=s.nextInt()
var b=s.nextInt()
var c=s.nextInt()
var d=s.nextInt()
var e=s.nextInt()
var sum=a*a+b*b+c*c+d*d+e*e
print(sum%10)
}