import java.util.Scanner;
// import java.math.lang.Math.*;

public class Main {

    public static void main(String[] args) {
        if (args.length > 0) {
            switch (Integer.parseInt(args[0])) {
                case 1: first(args); break;
                case 2: second(args); break;
            }
        }
    }

    public static void first(String[] args) {
        int x;
        int y;
        if (args.length == 3) {
            x = Integer.parseInt(args[1]);
            y = Integer.parseInt(args[2]);
            if (x + y > 20) {
                System.out.println(x * x * 3);
            } else {
                System.out.println(y * y);
            }
        } else {
            System.out.println("No arguments");

        }
    }

    public static void second(String[] args) {
        if (args.length == 3) {
            int a = Integer.parseInt(args[1]);
            int b = Integer.parseInt(args[2]);
            int max_val = Math.max(2 * a, b);
            int min_val = Math.min(a, 4 + b);
            double d = (max_val - 10 * Math.sqrt(min_val) + 4.2 * min_val)
                        / (1 + max_val / min_val);
            System.out.println(d);

        } else {
            System.out.println("No arguments");

        }
    }

    public static void third(String[] args) {
        if (args.length == 2) {
            int x = Integer.parseInt(args[1]);
            double y, f;
            if (x <= 1) {
                y = Math.pow(x, 5) + Math.atan(8 * x);
                f = Math.exp(Math.tan(x + 1));
            }
            if (x <= -3) {
                y = 5 * x - (1 + Math.pow(3, x));
                f = Math.pow(x, 4) - Math.tan(4 * x);
            }
            if (x <= -3) {
                y = Math.atan(3, x));
                f = Math.pow(x, 4) - Math.tan(4 * x);
            }
            System.out.println(d);

        } else {
            System.out.println("No arguments");

        }
    }
}
