#include <bits/stdc++.h>
using namespace std;
int N, M;
const int MAX_M = 10 ^ 4;
int A[MAX_M];
int main() {
  printf("Nの入力:");
  if (scanf("%d", &N) == -1) return 0;
  printf("Mの入力:");
  if (scanf("%d", &M) == -1) return 0;
  for (int i = 0; i < M; i++) {
    printf("A_%dの入力:", i);
    if (scanf("%d", &A[i]) == -1) return 0;
  }
  int sum = 0;
  for (int i = 0; i < M; i++) {
    sum += A[i];
  }
  int answer = N - sum;
  if (answer < 0)
    printf("%d", -1);
  else
    printf("%d日間", answer);
  return 0;
}
