#include <iostream>
using namespace std;
int main() {
    int N, K; cin >> N >> K;
    int ans = 0;
    for (int i = 1; i <= N; i++) if (i + (K - 1) <= N) ans++;
    printf("%d\n", ans);
}
#include <bits/stdc++.h>
using namespace std;
#define ALL(a) (a).begin(),(a).end()
#define rALL(a) (a).rbegin(),(a).rend()
typedef pair<int, int> Pint;
typedef pair<int64_t, int64_t> Pll;


int main() {
    int N, K;
    cin >> N >> K;
    cout << N - K + 1 << endl;
}

