using System.Collections.Generic;
public class FairRandom {
public FairRandom(int s){
private int lastNumber = 3;
private Random rnd = new Random(seed);
else if (lastNumber == 1) {
public static void Main()
int seed = Convert.ToInt32(Console.ReadLine());
FairRandom rnd = new FairRandom(seed);
Console.WriteLine(rnd.Next());