public class Main { public static void main(String[] args) { int ans = 0, count = 1; for (int x = 1; x <= 12; x++) { for (int y1 = 0; y1 <= 3; y1++) { for (int y2 = 0; y2 < 10; y2++) { ans = y1 + y2; if (ans == x) { count++; } } } } System.out.println(count); } }