using System; using System.Linq; using System.Collections.Generic; public class yukicoder { private static Dictionary Memo; public static decimal fib(decimal n) { Memo = new Dictionary(); return _fib(n); } private static decimal _fib(decimal n) { if (n == 0) return 0; if (n == 1) return 1; if (!Memo.ContainsKey(n)) { Memo[n] = _fib(n - 2) + _fib(n - 1); } return Memo[n]; } public static void Main() { decimal[] foo = Console.ReadLine().Split(' ').Select(x => decimal.Parse(x)).ToArray(); decimal a = foo[0]; decimal b = foo[1]; Console.WriteLine(fib(a - 1)); } }