public class Main {
public static void main(String[] args) {
java.util.Scanner in = new java.util.Scanner(System.in);
int n = in.nextInt(), sum = 0, cnt = 0, min = 10;
while (n != 0) { // обработка цифр числа
int t = n % 10;
if (t < min) { min = t; } // наименьшая цифра
if (n % 2 == 0) { // сумма и кол-во чётных цифр
++cnt;
sum += t;
}
n /= 10;
}
System.out.printf("%25d %25d %25d", sum, cnt, min);
}
}
public class Main {
public static void main(String[] args) {
java.util.Scanner in = new java.util.Scanner(System.in);
int max = -1;
while (true) {
int n = in.nextInt();
if (n == 0) { break; }
if (n % 10 == 8 && n > max) { max = n; }
}
if (max > 0) {
System.out.printf("%25d", max);
} else {
System.out.print("NO");
}
}
}
public class Main {
public static void main(String[] args) {
java.util.Scanner in = new java.util.Scanner(System.in);
int k = (in.nextInt() % 360 + 360) % 360; // угол в диапазоне 0-359
if (k > 180) { k -= 360; }
System.out.printf("%25d", k);
}
}