# -*- coding: utf-8 -*-
"""
Created on Tue Jun 17 15:51:54 2014

@author: user
"""

def Ackermann( m , n ):
    if m == 0:
        return n+1
    elif m > 0 and n == 0:
        return Ackermann( m-1 , 1 )
    elif m > 0 and n > 0:
        return Ackermann( m-1 , Ackermann( m , n-1 ) )

print Ackermann( 1 , 2 )