print(sum(x for x in map(int, input().split()) if x%5==0))
5 7 10
15
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!