#include <bits/stdc++.h>
using namespace std;
int recursive1(int a, int b, int c, int d, int e, int f, int g, int h,
int i, int j, int k, int l, int m, int n, int o, int p,
int q, int r, int s, int t, int u, int v, int w, int x,
int y, int z, int depth)
{
int ret = 0;
if (depth > 0)
ret = recursive1(a, b, c, d, e, f, g, h,
i, j, k, l, m, n, o, p,
q, r, s, t, u, v, w, x,
y, z, depth - 1);
ret += a + b + c + d + e + f + g + h;
ret += i + j + k + l + m + n + o + p;
ret += q + r + s + t + u + v + w + x;
ret += y + z;
return ret;
}
int main()
{
int N, A, B;
cin >> N >> A >> B;
cout << N - A + B << endl;
static const int depth = 4459062;
recursive1(0, 1, 2, 3, 4, 5, 6, 7,
0, 1, 2, 3, 4, 5, 6, 7,
0, 1, 2, 3, 4, 5, 6, 7,
0, 1, depth);
}