CCC '10 J1 - What is n, Daddy?
Source Code
import java.io.*;
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int a = in.nextInt();
int b;
int c;
int counter = 0;
c = a;
b = 0;
for(int i = 0; i < (a / 2) + 1; i++){
if(c <= 5 && b <= 5){
// System.out.println(a + " is " + b + " + " + c);
counter++;
}
b++;
c--;
}
System.out.println(counter);
}
}