import java.net.ServerSocket;
import java.net.Socket;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.PrintWriter;
public class SimpleStockServer
{
private static String [][] stockDB = {{"red", "12"},
{"orange", "2"},
{"yellow", "4"},
{"green", "109"},
{"blue", "24"},
{"indigo", "0"},
{"violet", "7"}};
public static void main(String[] args)
{
String result = "no result";
try
{
ServerSocket connection = new ServerSocket(4000);
Socket s = connection.accept();
BufferedReader in = new BufferedReader(new InputStreamReader(
s.getInputStream()));
PrintWriter out = new PrintWriter(s.getOutputStream(), true);
String shirtColour = in.readLine();
for(int i = 0; i < 7; ++i)
{
if(stockDB[i][0].equals(shirtColour))
{
result = stockDB[i][1];
}
}
out.println(result);
}
catch(IOException ioe){}
}
}