using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace 汉诺塔问题
{
class program
{
static void Main(string[] args)
{
Caculator c = new Caculator();
c.Hanio(3);
int x = c.i;
Console.WriteLine(x);
}
class Caculator
{
public int i =0;
public void Hanio(int n)
{
if (n == 1)
i++;
else
{
Hanio(n - 1);
i++;
Hanio(n - 1);
}
}
}
}
}