#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Wed Jun 23 18:06:19 2021


@author: samac
"""

def pos(n,a,b):
    res = n - max(a + 1, n - b) + 1;
    print(res)
    
    
    
def main():
    n,a,b=map(int,input().split())
    pos(n,a,b)
    
main()

60171c765556998aa8a9364d0392bd540f77a90f
<mask token>

<mask token>


def main():
    n, a, b = map(int, input().split())
    pos(n, a, b)


<mask token>

<mask token>


def pos(n, a, b):
    res = n - max(a + 1, n - b) + 1
    print(res)


def main():
    n, a, b = map(int, input().split())
    pos(n, a, b)


<mask token>

<mask token>


def pos(n, a, b):
    res = n - max(a + 1, n - b) + 1
    print(res)


def main():
    n, a, b = map(int, input().split())
    pos(n, a, b)


main()

#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Wed Jun 23 18:06:19 2021


@author: samac
"""

def pos(n,a,b):
    res = n - max(a + 1, n - b) + 1;
    print(res)
    
    
    
def main():
    n,a,b=map(int,input().split())
    pos(n,a,b)
    
main()
