Please, help me with program logic - C#