#include <iostream>
#include <math.h>

using namespace std;

const int amax = 1000;

struct BigInt
{
  int len;
  int a[amax];

};
           
ostream& operator<< (ostream &os, BigInt &a)
{
  for (int i = a.len - 1; i >= 0; i--)
  {
     os << a.a[i];
  }

  return os;
}


BigInt operator+ (BigInt a, BigInt b)
{
  BigInt result;
  memset(result.a, 0, sizeof(result.a));
  int curry = 0;
  result.len = max(a.len, b.len);
  
  for (int i = 0; i < result.len; i++)
  {
    result.a[i] = a.a[i] + b.a[i] + curry;
    curry = result.a[i] / 10;
    result.a[i] = result.a[i] % 10;      
  }

  if (curry > 0)
  {
    result.a[result.len] = 1;
    result.len++;
  }

  return result;

}


BigInt operator- (BigInt a, BigInt b)
{
  BigInt result;
  memset(result.a, 0, sizeof(result.a));
  int curry = 0;
  result.len = max(a.len, b.len);
  
  for (int i = 0; i < result.len; i++)
  {
    result.a[i] = a.a[i] - b.a[i] - curry;
    if (result.a[i] < 0)
    {
      curry = 1;
      result.a[i] += 10;
    }
    else curry = 0;

  }

  if (result.a[result.len - 1] == 0)
  {    
    result.len--;
  }

  return result;

}

istream& operator>> (istream &is, BigInt &a)
{
  string s;
  is >> s;
  BigInt res;
  int n = s.length();
  res.len = n;
  memset(res.a, 0, sizeof(res.a));

  for (int i = 0; i < n; i++)
  {
     res.a[n - i - 1] = s[i] - '0';
  }

  a = res;
  return is;
}



int main(){

  freopen("D.in", "r", stdin);
  freopen("D.out", "w", stdout);

  BigInt n, a , b;      
  cin >> n >> a >> b;

  BigInt r = n - a;
  r = r + b;

  cout << r;

  return 0;
}