import java.io.*;
import java.util.*;

public class MAXLN{
static final double con = 0.25;
public static void main(String[] args) throws IOException {
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out));
int t = Integer.parseInt(in.readLine());
int a[] = new int[1000];
for(int i = 1; i <= t; i++){
a[i] = Integer.parseInt(in.readLine());
}
for(int i = 1; i <= t; i++){
double s = (double) (4 * a[i] * a[i] + con);
System.out.printf("Case %d: %.2f\n", i, s);
}
}
}