Language: Java

using System;
using System.Text;
using System.Linq;
using System.Collections;
using System.Collections.Generic;
using static System.Console;
using static System.Math;

namespace AtCorder
{
    class Program
    {
        static void Main(string[] args)
        {
            new Program().Solve(new ConsoleInput(Console.In, ' '));
        }
        public void Solve(ConsoleInput cin)
        {
            var a = cin.ReadInt;
            var b = cin.ReadInt;
            if((a + b) % 2 == 1)
            {
                WriteLine("IMPOSSIBLE");
                return;
            }
            var k = (a + b) / 2;
            WriteLine(k);

        }
    }
    public class ConsoleInput
    {
        private readonly System.IO.TextReader _stream;
        private char _separator = ' ';
        private Queue<string> inputStream;
        public ConsoleInput(System.IO.TextReader stream, char separator = ' ')
        {
            this._separator = separator;
            this._stream = stream;
            inputStream = new Queue<string>();
        }
        public string Read
        {
            get
            {
                if (inputStream.Count != 0) return inputStream.Dequeue();
                string[] tmp = _stream.ReadLine().Split(_separator);
                for (int i = 0; i < tmp.Length; ++i)
                    inputStream.Enqueue(tmp[i]);
                return inputStream.Dequeue();
            }
        }
        public string ReadLine { get { return _stream.ReadLine(); } }
        public int ReadInt { get { return int.Parse(Read); } }
        public long ReadLong { get { return long.Parse(Read); } }
        public double ReadDouble { get { return double.Parse(Read); } }
        public string[] ReadStrArray(long N) { var ret = new string[N]; for (long i = 0; i < N; ++i) ret[i] = Read; return ret; }
        public int[] ReadIntArray(long N) { var ret = new int[N]; for (long i = 0; i < N; ++i) ret[i] = ReadInt; return ret; }
        public long[] ReadLongArray(long N) { var ret = new long[N]; for (long i = 0; i < N; ++i) ret[i] = ReadLong; return ret; }
    }
}


Compiler output:
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
using System;
^
  (use --enable-preview to enable unnamed classes)
Main.java:2: error: class, interface, enum, or record expected
using System.Text;
^
Main.java:3: error: class, interface, enum, or record expected
using System.Linq;
^
Main.java:4: error: class, interface, enum, or record expected
using System.Collections;
^
Main.java:5: error: class, interface, enum, or record expected
using System.Collections.Generic;
^
Main.java:6: error: class, interface, enum, or record expected
using static System.Console;
^
Main.java:7: error: class, interface, enum, or record expected
using static System.Math;
^
Main.java:9: error: class, interface, enum, or record expected
namespace AtCorder
^
Main.java:33: error: ';' expected
        private readonly System.IO.TextReader _stream;
                               ^
Main.java:36: error: ',', ')', or '[' expected
        public ConsoleInput(System.IO.TextReader stream, char separator = ' ')
                                                                       ^
Main.java:42: error: ';' expected
        public string Read
                          ^
Main.java:44: error: not a statement
            get
            ^
Main.java:44: error: ';' expected
            get
               ^
Main.java:53: error: ';' expected
        public string ReadLine { get { return _stream.ReadLine(); } }
                              ^
Main.java:53: error: not a statement
        public string ReadLine { get { return _stream.ReadLine(); } }
                                 ^
Main.java:53: error: ';' expected
        public string ReadLine { get { return _stream.ReadLine(); } }
                                    ^
Main.java:54: error: ';' expected
        public int ReadInt { get { return int.Parse(Read); } }
                          ^
Main.java:54: error: not a statement
        public int ReadInt { get { return int.Parse(Read); } }
                             ^
Main.java:54: error: ';' expected
        public int ReadInt { get { return int.Parse(Read); } }
                                ^
Main.java:54: error: class expected
        public int ReadInt { get { return int.Parse(Read); } }
                                              ^
Main.java:54: error: ';' expected
        public int ReadInt { get { return int.Parse(Read); } }
                                                   ^
Main.java:54: error: not a statement
        public int ReadInt { get { return int.Parse(Read); } }
                                                    ^
Main.java:54: error: ';' expected
        public int ReadInt { get { return int.Parse(Read); } }
                                                        ^
Main.java:55: error: ';' expected
        public long ReadLong { get { return long.Parse(Read); } }
                            ^
Main.java:55: error: not a statement
        public long ReadLong { get { return long.Parse(Read); } }
                               ^
Main.java:55: error: ';' expected
        public long ReadLong { get { return long.Parse(Read); } }
                                  ^
Main.java:55: error: class expected
        public long ReadLong { get { return long.Parse(Read); } }
                                                 ^
Main.java:55: error: ';' expected
        public long ReadLong { get { return long.Parse(Read); } }
                                                      ^
Main.java:55: error: not a statement
        public long ReadLong { get { return long.Parse(Read); } }
                                                       ^
Main.java:55: error: ';' expected
        public long ReadLong { get { return long.Parse(Read); } }
                                                           ^
Main.java:56: error: ';' expected
        public double ReadDouble { get { return double.Parse(Read); } }
                                ^
Main.java:56: error: not a statement
        public double ReadDouble { get { return double.Parse(Read); } }
                                   ^
Main.java:56: error: ';' expected
        public double ReadDouble { get { return double.Parse(Read); } }
                                      ^
Main.java:56: error: class expected
        public double ReadDouble { get { return double.Parse(Read); } }
                                                       ^
Main.java:56: error: ';' expected
        public double ReadDouble { get { return double.Parse(Read); } }
                                                            ^
Main.java:56: error: not a statement
        public double ReadDouble { get { return double.Parse(Read); } }
                                                             ^
Main.java:56: error: ';' expected
        public double ReadDouble { get { return double.Parse(Read); } }
                                                                 ^
Main.java:61: error: class, interface, enum, or record expected
}
^
38 errors