using System; class Program { static void Main(string[] args) { int day = 1; int cnt = 0; int x,y,z; string[] str = Console.ReadLine().Split(' ');//2つ以上のスペース区切り入力の取得 x = int.Parse(str[0]); //数値で受け取りたい場合は変換する y = int.Parse(str[1]); //数値で受け取りたい場合は変換する z = int.Parse(str[2]); //数値で受け取りたい場合は変換する while (day <= z) { if (day != x) { if (day != y) { cnt = cnt + 1; } } day = day + 1; } Console.WriteLine(cnt); } }