#include <stdio.h>
#include <string.h>

void caesar_encrypt(const int shift, char text[]);

int main() {
    printf("Enter the shift (N): ");
    int shift;
    scanf("%d", &shift);

    printf("Enter the string to encrypt: ");
    char string[11];
    scanf("%10s", string);

    char encrypted[strlen(string) + 1];
    strcpy(encrypted, string);

    caesar_encrypt(shift, encrypted);

    printf("%s\n", encrypted);

    return 0;
}

void caesar_encrypt(const int shift, char text[]) {
    for (size_t index = 0, length = strlen(text); index < length; index++) {
        text[index] = 'A' + (text[index] - 'A' + shift) % 26;
    }
}
